Bug 13200

Summary: The assembler chokes on very long operands when called with -k
Product: Base System Reporter: ganssauge <ganssauge>
Component: gnuAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 2.2.8-STABLE   
Hardware: Any   
OS: Any   

Description ganssauge 1999-08-17 16:10:01 UTC
When compiling C++ programs heavily using templates with EGCS-1.1.2
the compilation is aborted with a message stating that the assembler 
terminated with signal 11.
The same problem should happen when compiling to a.out on FreeBSD 3.2.

Fix: Here is a patch to the assembler:


if (strncmp(cp+1, "PLT", 3) == 0) {
                                        i.disp_reloc[this_operand] = RELOC_JMP_T
BL;--xivKceQUIdh5orFZ5En2pNNqaSMBtl79jvcgj5tUsoNbm7Q6
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- gnu/usr.bin/as/config/tc-i386.c     Fri Feb  5 12:53:30 1999
+++ /usr/src/gnu/usr.bin/as/config/tc-i386.c    Tue Aug 17 16:57:48 1999
@@ -1608,7 +1608,7 @@
                        register char *cp;
                        if (picmode &&
                                (cp = strchr(input_line_pointer,'@'))) {
-                               char tmpbuf[BUFSIZ];
+                               char *tmpbuf = alloca (cp - input_line_pointer +
 20);
How-To-Repeat: Try to compile kdelibs11 from the ports collection using egcs-1.1.2.
the problem occurs at kab/addressbook.cc and on kab/keyvaluemap.cc.
Comment 1 Mike Barcroft freebsd_committer freebsd_triage 2001-07-21 01:14:50 UTC
State Changed
From-To: open->feedback


Does this problem still occur in newer versions of FreeBSD, 
such as 4.3-RELEASE?
Comment 2 ashp freebsd_committer freebsd_triage 2002-01-15 18:00:38 UTC
State Changed
From-To: feedback->closed

egcs isn't the base compiler anymore, and this works fine with the latest 
stable.