Opened 2 years ago

Closed 2 years ago

#65612 closed defect (fixed)

nqp & rakudo 2022.07 on Rosetta: incorrect checksum for freed object - object was probably modified after being freed

Reported by: barracuda156 Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, rosetta, snowleopard Cc:
Port: nqp, rakudo, MoarVM

Description

On 10.6.8 Rosetta I get the following errors, though the build still succeeds (and apparently binaries work, otherwise I could not get anywhere further from MoarVM).

When building nqp:

+++ Compiling	gen/moar/stage2/NQPP6QRegex.moarvm
moar(36849,0x802fc540) malloc: *** error for object 0x80a02af4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
moar(36849,0x802fc540) malloc: *** error for object 0x80a02af0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
+++ Creating	stage 2 NQP

When building rakudo:

--->  Building rakudo
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_rakudo/rakudo/work/rakudo-2022.07" && /usr/bin/make -j6 -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_rakudo/rakudo/work/rakudo-2022.07'
+++ Checking for moar NQP version
+++ Expanding	gen/moar/main-version.nqp
fatal: not in a git directory
fatal: not in a git directory
+++ Generating	gen/moar/rakudo.nqp
+++ Generating	gen/moar/Grammar.nqp
+++ Generating	gen/moar/World.nqp
+++ Generating	gen/moar/ModuleLoader.nqp
nqp-m(37184,0x802fc540) malloc: *** error for object 0x80a02af4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37184,0x802fc540) malloc: *** error for object 0x80a02af0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
+++ Compiling	blib/Perl6/ModuleLoader.moarvm
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02af0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02ae4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02ae0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02ab4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02ab0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02a74: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02a70: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02a54: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02a50: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02a14: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02784: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02744: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02724: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a026e4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a026c4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02684: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02664: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02624: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02604: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a025c4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a025a4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a02564: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
nqp-m(37193,0x802fc540) malloc: *** error for object 0x80a022d4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Also gcc12 does not recognize -Wno-logical-op-parentheses flag, though does not err out on it:

cc1: note: unrecognized command-line option '-Wno-logical-op-parentheses' may have been intended to silence earlier diagnostics

Yet:

10:~ svacchanda$ port -v installed MoarVM
The following ports are currently installed:
  MoarVM @2022.07_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-08-04T20:16:30+0545'
10:~ svacchanda$ port -v installed nqp
The following ports are currently installed:
  nqp @2022.07_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-08-04T20:24:01+0545'
10:~ svacchanda$ port -v installed rakudo
The following ports are currently installed:
  rakudo @2022.07_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-08-04T20:43:36+0545'

Change History (6)

comment:1 Changed 2 years ago by kencu (Ken)

this looks like that same error we have been seeing for several years with the ODR issue with libstdc++ in libgcc on some systems.

The only fix for now is to use the binwrapping in legacysupport, which can work sometimes. Look at the cmake Portfile to see how to do it, as one example. In this case, looks like an intermediate build product is failing, and that is always harder.

As you have heard, Iain is working on this ODR issue (along with 1.2 million other things). No timeline or promise that it will ever be fixed, however.

comment:2 in reply to:  1 Changed 2 years ago by barracuda156

Replying to kencu:

this looks like that same error we have been seeing for several years with the ODR issue with libstdc++ in libgcc on some systems.

The only fix for now is to use the binwrapping in legacysupport, which can work sometimes. Look at the cmake Portfile to see how to do it, as one example. In this case, looks like an intermediate build product is failing, and that is always harder.

As you have heard, Iain is working on this ODR issue (along with 1.2 million other things). No timeline or promise that it will ever be fixed, however.

Thank you. Yes, these malloc errors look familiar. Usually build fails with them though. Here it appears to go through completion. I will see if there are some tests for rakudo to check if it works as supposed to.

  1. S. If we manage to fix libcxx for PPC, that will solve the problem? Iain said that he backported an option to use libcxx from gcc12 to earlier versions (through gcc10?).

comment:3 Changed 2 years ago by kencu (Ken)

libcxx has no ODR issues with libstdc++, so you’re OK there.

What is much less OK is that nobody anywhere has ever built anything using gcc on ppc against libc++. Never.

So it’s a complete no-mans-land of uncertainty. Many, many issues can be expected. Every single port will need to be quite thoroughly tested, especially ports that other things depend on, like compilers, linkers, assemblers, glib2, etc.

For me… that is a very large amount of work, esp compared to installing a current debian on ppc64 which is extensively tested, has qt6, llvm, rust, etc…

It’s all in how you choose to spend your remaining years, really.

comment:4 in reply to:  3 Changed 2 years ago by barracuda156

Replying to kencu:

What is much less OK is that nobody anywhere has ever built anything using gcc on ppc against libc++. Never.

So it’s a complete no-mans-land of uncertainty. Many, many issues can be expected. Every single port will need to be quite thoroughly tested, especially ports that other things depend on, like compilers, linkers, assemblers, glib2, etc.

Yes, this is understandable.

By the way, I remember that you built simple ports for ppc with an old clang (3.5? 5?) and they linked to libcxx. But eventually that endeavor failed. Was it that more complex ports failed to build or even simple ones did not actually work?

comment:5 in reply to:  3 Changed 2 years ago by barracuda156

comment:6 Changed 2 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.