#66159 closed defect (fixed)
gdk-pixbuf2 dependents malloc issue (PPC and Intel)
Reported by: | barracuda156 | Owned by: | kencu (Ken) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | leopard, snowleopard | Cc: | mascguy (Christopher Nielsen) |
Port: | gdk-pixbuf2 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I get this when installing some gdk-pixbuf
dependents:
gdk-pixbuf-query-loaders(9010) malloc: *** error for object 0xa0931034: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(9010) malloc: *** error for object 0xa09310a4: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug
This happens after install, before cleaning build directory. So install succeeds.
gdk-pixbuf
is built with gcc-4.2
, as we as its dependents are (say, librsvg
). So we should not get a double libstdc++
issue as in other malloc
errors cases.
What may cause this, any ideas?
UPD. Same error on Intel: comment:ticket:65407:7
Attachments (1)
Change History (21)
comment:1 Changed 2 years ago by barracuda156
Description: | modified (diff) |
---|---|
Summary: | gdk-pixbuf dependents malloc issue → gdk-pixbuf dependents malloc issue (PPC and Intel) |
comment:2 Changed 2 years ago by barracuda156
Keywords: | leopard snowleopard added; powerpc removed |
---|
comment:3 follow-ups: 7 8 9 Changed 2 years ago by kencu (Ken)
comment:4 follow-up: 6 Changed 2 years ago by jmroot (Joshua Root)
Cc: | mascguy added |
---|---|
Port: | gdk-pixbuf2 added; gdk-pixbuf removed |
Summary: | gdk-pixbuf dependents malloc issue (PPC and Intel) → gdk-pixbuf2 dependents malloc issue (PPC and Intel) |
There's no gdk-pixbuf port, assuming you mean gdk-pixbuf2?
comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:6 Changed 2 years ago by barracuda156
comment:7 Changed 2 years ago by barracuda156
Replying to kencu:
Exactly what system? How to reproduce exactly?
I am not getting any errors as yet:
Here someone got it on 10.5 Intel: https://trac.macports.org/ticket/65407#comment:7
As I recall, I am having this issue on literally every PPC system, consistently (that is, 10.5.8, 10A190 and 10.6.8 Rosetta; not sure about Tiger, can check later). I will reboot into Leopard once GTK3 builds and post a log.
comment:8 follow-up: 10 Changed 2 years ago by barracuda156
Replying to kencu:
On a side note, we have once discussed meson
crossfiles: here is why it is desirable, perhaps, to have strip
specified. Since meson
is broken for FAT builds: https://github.com/mesonbuild/meson/issues/11034 – I add muniversal
PG to gdk-pixbuf2
. Then during configure I get this:
WARNING: Cross file does not specify strip binary, result will not be stripped.
comment:9 Changed 2 years ago by barracuda156
Replying to kencu:
Exactly what system? How to reproduce exactly?
So I have built it on Leopard now. Build itself looks okay, destroot too. Only when I actually install it, this happens:
x ./opt/local/share/man/man1/gdk-pixbuf-query-loaders.1.gz gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x7fff702e3e88: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x7fff702e3da8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e22c8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e1698: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e15b8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e1628: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e1428: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e12d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e1198: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e1238: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e1008: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e2148: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e2448: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e2458: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug gdk-pixbuf-query-loaders(3014) malloc: *** error for object 0x1017e2490: Non-aligned pointer being freed (2) *** set a breakpoint in malloc_error_break to debug ---> Cleaning gdk-pixbuf2 ---> Removing work directory for gdk-pixbuf2 ---> Updating database of binaries
(While on 10A190 this error also happens, this is from 10.5.8.)
Changed 2 years ago by barracuda156
Build log from Leopard just for the record
comment:10 follow-up: 11 Changed 2 years ago by kencu (Ken)
Replying to barracuda156:
Replying to kencu:
On a side note, we have once discussed
meson
crossfiles: here is why it is desirable, perhaps, to havestrip
specified. Sincemeson
is broken for FAT builds: https://github.com/mesonbuild/meson/issues/11034 – I addmuniversal
PG togdk-pixbuf2
. Then during configure I get this:WARNING: Cross file does not specify strip binary, result will not be stripped.
it gives that message, but that does not cause any build errors.
comment:11 Changed 2 years ago by barracuda156
Replying to kencu:
Replying to barracuda156:
Replying to kencu:
On a side note, we have once discussed
meson
crossfiles: here is why it is desirable, perhaps, to havestrip
specified. Sincemeson
is broken for FAT builds: https://github.com/mesonbuild/meson/issues/11034 – I addmuniversal
PG togdk-pixbuf2
. Then during configure I get this:WARNING: Cross file does not specify strip binary, result will not be stripped.it gives that message, but that does not cause any build errors.
Fair enough.
What about those malloc ones? Any ideas how to fix those?
comment:12 follow-up: 14 Changed 2 years ago by kencu (Ken)
your build log from leopard appears to show a successful install with no errors.
I get no errors on Leopard Intel, installing or running.
At the moment, I don’t know how/what/when you see this error. I can’t understand from your posting so far when you see it, and I can’t reproduce it.
comment:13 Changed 2 years ago by kencu (Ken)
perhaps post up one, clean, full, log that shows the error?
comment:14 Changed 2 years ago by barracuda156
Replying to kencu:
your build log from leopard appears to show a successful install with no errors.
I get no errors on Leopard Intel, installing or running.
At the moment, I don’t know how/what/when you see this error. I can’t understand from your posting so far when you see it, and I can’t reproduce it.
How do I prevent Macports from deleting logs upon install? The error happens after install, right prior to cleanup.
comment:15 follow-up: 16 Changed 2 years ago by kencu (Ken)
there is a setting in macports.conf for that, I recall
comment:16 Changed 2 years ago by barracuda156
Replying to kencu:
there is a setting in macports.conf for that, I recall
Ok, will try. (There probably won’t be much more though besides of what I quoted above.)
comment:17 Changed 2 years ago by kencu (Ken)
OK, I bumped into this finally on a Leopard Intel system and may have sorted it out.
gdk-pixbuf2 builds on that system with gcc-4.2, but still throws the malloc error that you see when using the new libstdc++ in gcc7.5+.
This is a bit of a weird situation, because as far as I can see (looking quickly), there is no c++ code anywhere in gdk-pixbuf2. But somewhere, one of the libraries it links to must invoke some, because crash it does.
So we need to do the legacysupport binwrapping trick on the gdk-pixbuf2 binaries. But legacysupport never anticipated this case, so it tries to block you, thinking you're out of your mind perhaps, by making sure you're only binwrapping if the stdlib=macports-libstdc++.
So to allow the binwrapping to work, we have to tell MacPorts that is what we are doing, and then it can work, the bins are wrapped, and all works well.
Adding this to the gdk-pixbuf2 portfile fixes the bins, in the end:
PortGroup legacysupport 1.1 legacysupport.newest_darwin_requires_legacy 10 legacysupport.redirect_bins gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-pixbuf-query-loaders gdk-pixbuf-thumbnailer compiler.cxx_standard 2011
And then this works again without crashing:
$ sudo gdk-pixbuf-query-loaders --update-cache
Now, everyone is going to find it completely stupid to set compiler.cxx_standard 2011
on a port that only uses "C", so we probably have to come up with some new plan on how to enable that.
Or just copy-paste the post-destroot into the portfile and tweak it so it works. But here I defer to the maintainer, as no point wasting time on something that won't get committed.
And now, a whole new chapter in the malloc: *** error for object 0x1017e2458: Non-aligned pointer being freed
saga opens.
comment:19 follow-up: 20 Changed 2 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:20 Changed 23 months ago by barracuda156
Replying to kencu:
Thank you!
(Sorry that I dropped out of most discussions recently: travelling and therefore away from most of development work, and also busy with sorting out that huge PR for R.)
Exactly what system? How to reproduce exactly?
I am not getting any errors as yet: