FS#23687 - [gcc 4.6] Testing version 4.6.0-2 gives a segfault while trying to build mozilla.

Attached to Project: Arch Linux
Opened by Frederic Bezies (fredbezies) - Monday, 11 April 2011, 05:26 GMT
Last edited by Allan McRae (Allan) - Saturday, 16 April 2011, 07:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Got this error when trying to build mozilla trunk source code (a segfault ?!)

/home/fred/logs/mail/src/mozilla/js/src/methodjit/MonoIC.cpp:1338:1: erreur interne du compilateur: Erreur de segmentation
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <https://bugs.archlinux.org/> pour plus de détail.

-> internal error of the compiler.


Additional info:
gcc 4.6.0-2 and its depends.

Steps to reproduce:

Just upgrade. And try to build mozilla trunk source code.

Downgrading to gcc 4.6.0-1 and its depends make this bug go away.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 16 April 2011, 07:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  4.6.0-3
Comment by Frederic Bezies (fredbezies) - Monday, 11 April 2011, 05:34 GMT
And all gcc related packages where installed (which I downgraded this morning) :

[2011-04-11 06:29] synchronizing package lists
[2011-04-11 06:29] Running 'pacman -S -u'
[2011-04-11 06:29] starting full system upgrade
[2011-04-11 06:30] upgraded bluez (4.90-1 -> 4.91-1)
[2011-04-11 06:30] upgraded isl (0.05.1-1 -> 0.06-1)
[2011-04-11 06:30] upgraded cloog (0.16.1-1 -> 0.16.2-1)
[2011-04-11 06:30] upgraded gcc (4.6.0-1 -> 4.6.0-2)
[2011-04-11 06:30] upgraded gcc-libs (4.6.0-1 -> 4.6.0-2)
[2011-04-11 06:30] upgraded mesa (7.10.1-2 -> 7.10.2-2)
[2011-04-11 06:30] upgraded mkinitcpio (0.6.9-1 -> 0.6.10-1)
[2011-04-11 06:30] upgraded wxgtk (2.8.11-2 -> 2.8.12-1)
Comment by Allan McRae (Allan) - Monday, 11 April 2011, 06:13 GMT
i686 or x86_64? Are you using custom CFLAGS, etc?
Comment by Kristoffer Tidemann (ktide) - Monday, 11 April 2011, 06:36 GMT
Did you try to rebuild the package after that error? I had a few of those happen to me over the years on numerous distros and at the end I was always able to finish the build.
Comment by Frederic Bezies (fredbezies) - Monday, 11 April 2011, 06:37 GMT
Here is the CXXFLAGS line :

export CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fpermissive"

That's it. Only added -fpermissive. Using a version of mozilla firefox built with "downgraded" version.

Wonder if -fpermissive could crash gcc...
Comment by Frederic Bezies (fredbezies) - Monday, 11 April 2011, 08:50 GMT
@ktide : I tried after cleaning ccache, and same problem. Downgrading was the only working way to see this bug disappearing.
Comment by Allan McRae (Allan) - Monday, 11 April 2011, 09:19 GMT
Does it always crash in the same place?
Comment by Frederic Bezies (fredbezies) - Monday, 11 April 2011, 10:11 GMT
Yes. Always on the same file, which is properly built with gcc 4.6.0-1.

http://mxr.mozilla.org/mozilla-central/source/js/src/methodjit/MonoIC.cpp

And code portion ending in line 1338 :

1305 if (purgeAll) {
1306 /* Purge ICs generating stubs into execPools. */
1307 uint32 released = 0;
1308
1309 ic::EqualityICInfo *equalityICs_ = equalityICs();
1310 for (uint32 i = 0; i < nEqualityICs; i++) {
1311 ic::EqualityICInfo &ic = equalityICs_[i];
1312 if (!ic.generated)
1313 continue;
1314
1315 JSC::FunctionPtr fptr(JS_FUNC_TO_DATA_PTR(void *, ic::Equality));
1316 repatcher.relink(ic.stubCall, fptr);
1317 repatcher.relink(ic.jumpToStub, ic.stubEntry);
1318
1319 ic.generated = false;
1320 released++;
1321 }
1322
1323 ic::SetGlobalNameIC *setGlobalNames_ = setGlobalNames();
1324 for (uint32 i = 0; i < nSetGlobalNames; i ++) {
1325 ic::SetGlobalNameIC &ic = setGlobalNames_[i];
1326 if (!ic.hasExtraStub)
1327 continue;
1328 repatcher.relink(ic.fastPathStart.jumpAtOffset(ic.inlineShapeJump), ic.slowPathStart);
1329 ic.hasExtraStub = false;
1330 released++;
1331 }
1332
1333 JS_ASSERT(released == execPools.length());
1334 for (uint32 i = 0; i < released; i++)
1335 execPools[i]->release();
1336 execPools.clear();
1337 }
1338 }
Comment by Allan McRae (Allan) - Wednesday, 13 April 2011, 10:15 GMT
Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48549 - I will fix with a rebuild when the next gcc snapshot is released on the 15th.

Loading...