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

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

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 co pcc pcc-libs
pcc can compile a hello world application, but unfortunately a more
complex application fails:

wget --http-user="I accept"
wget --http-user="I accept"
(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
package: update
major internal compiler error:
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 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 :-)