Issue Details (XML | Word | Printable)

Key: PCC-399
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Anders Magnusson
Reporter: ольга крыжановская
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
pcc

ast-ksh/mamake build fails with "major internal compiler error" in src/cmd/INIT/mamake.c, line 372

Created: 11/Aug/12 10:45 PM   Updated: 01/May/14 11:01 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Suse 12.1/AMD64


 Description  « Hide
Anders, I pulled and build pcc from cvs -d
:pserver:anonymous@pcc.ludd.ltu.se:/cvsroot co pcc pcc-libs
pcc can compile a hello world application, but unfortunately a more
complex application fails:

wget --http-user="I accept www.opensource.org/licenses/eclipse"
--http-passwd="."
'http://www2.research.att.com/~gsf/download/tgz/INIT.2012-08-01.tgz
wget --http-user="I accept www.opensource.org/licenses/eclipse"
--http-passwd="."
'http://www2.research.att.com/~gsf/download/tgz/ast-ksh.2012-08-01.tgz
(export PATH=$HOME/pccinstall/bin:$PATH ; CC=$HOME/pccinstall/bin/pcc
~/bin/ksh ./bin/package make 2>&1 | tee -a buildlog.log)
package: update /home/fleyta/work/ast_ksh_20120801/build_pcc/bin/execrate
package: initialize the
/home/fleyta/work/ast_ksh_20120801/build_pcc/arch/linux.i386-64 view
package: update
/home/fleyta/work/ast_ksh_20120801/build_pcc/arch/linux.i386-64/lib/probe/C/make/probe
package: update
/home/fleyta/work/ast_ksh_20120801/build_pcc/arch/linux.i386-64/bin/mamake
major internal compiler error:
/home/fleyta/work/ast_ksh_20120801/build_pcc/src/cmd/INIT/mamake.c,
line 372
/home/fleyta/pccinstall/lib/ccom terminated with status 1

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Roland Mainz added a comment - 12/Aug/12 12:28 PM
Grumpf... I wish pcc would produce more "hints" what the horrible tentacle-armed internal error was... ;-/

Iain Hibbert added a comment - 13/Aug/12 09:20 PM
major internal compiler error is usually a SIGSEGV or SIGBUS, resulting from a bad pointer dereference

Roland Mainz added a comment - 13/Aug/12 09:54 PM
Any idea how to debug that ? I hit the issue myself but there is no coredump (yes... I did a $ ulimit -c unlimited #) and Linux doesn't have Solaris's coreadm. Poking with xx@@@!!!-gdb (I wish dbx would work on Linux) didn't help much either.

Iain Hibbert added a comment - 15/Aug/12 12:21 PM
pcc uses lazy initializations in general, pointers are expected to be valid when they are required. This means that a code path which forgets to set something may cause another segment to bomb out with an invalid pointer, but it is the first code path which is needing to be fixed.

To get a core dump you would need to disable the segvcatch() function in main.c but that is not greatly useful because of the above reason, it doesn't help you know where the pointer was not set correctly.

the best way is to reduce the problem to the essential part (and from your comments on pcc-list I think this may be same as PCC-400), then dump out the data structures with -X options to ccom and discover which was wrong and thus find the code which should have set it. (its easy to describe, but not so easy to do I think.. I can usually do the first part at least :)

Anders Magnusson made changes - 01/May/14 10:58 AM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson added a comment - 01/May/14 11:01 AM
This bug now seems fixed, mamake says:

linux-qyl5:/home/ragge/att >./arch/linux.i386-64/bin/mamake
mamake: Mamfile: not found

which I assume is a health sign :-)

Anders Magnusson made changes - 01/May/14 11:01 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]