#55204 closed defect (fixed)
mawk @1.3.4-20171017: Fails with 'Abort trap: 6' when using binary (source okay)
Reported by: | anowacki (Andy Nowacki) | Owned by: | tobypeterson |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.2 |
Keywords: | Cc: | ||
Port: | mawk |
Description
The binary of mawk distributed on the MacPorts servers seems to have an error:
$ sudo port install mawk && mawk 'BEGIN{print 1}' ---> Fetching archive for mawk ---> Attempting to fetch mawk-1.3.4-20171017_0.darwin_16.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017_0.darwin_16.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/mawk ---> Installing mawk @1.3.4-20171017_0 ---> Activating mawk @1.3.4-20171017_0 ---> Cleaning mawk ---> Updating database of binaries ---> Scanning binaries for linking errors ---> No broken files found. Abort trap: 6
Running any mawk
command fails in the same way.
Building from source is fine, however:
$ sudo port uninstall mawk && sudo port clean --dist mawk && sudo port -s install mawk && mawk 'BEGIN{print 1}' ---> Deactivating mawk @1.3.4-20171017_0 ---> Cleaning mawk ---> Uninstalling mawk @1.3.4-20171017_0 ---> Cleaning mawk ---> Cleaning mawk ---> Fetching distfiles for mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from https://distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://lil.fr.distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://osl.no.distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://nue.de.distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://ywg.ca.distfiles.macports.org/mirror/macports/distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://sea.us.distfiles.macports.org/macports/distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://kmq.jp.distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://jnb.za.distfiles.macports.org/distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from https://pek.cn.distfiles.macports.org/macports/distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://jog.id.distfiles.macports.org/macports/distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://cjj.kr.distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://aarnet.au.distfiles.macports.org/pub/macports/distfiles/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from http://nou.nc.distfiles.macports.org/pub/macports/distfiles.macports.org/mawk ---> Attempting to fetch mawk-1.3.4-20171017.tgz from ftp://ftp.invisible-island.net/mawk/ ---> Verifying checksums for mawk ---> Extracting mawk ---> Configuring mawk ---> Building mawk ---> Staging mawk into destroot ---> Installing mawk @1.3.4-20171017_0 ---> Activating mawk @1.3.4-20171017_0 ---> Cleaning mawk ---> Updating database of binaries ---> Scanning binaries for linking errors ---> No broken files found. 1
Attachments (1)
Change History (10)
comment:1 Changed 7 years ago by anowacki (Andy Nowacki)
comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Could you attach the crash log file?
comment:3 Changed 7 years ago by mf2k (Frank Schima)
Cc: | tobypeterson removed |
---|---|
Owner: | set to tobypeterson |
Status: | new → assigned |
Changed 7 years ago by anowacki (Andy Nowacki)
Attachment: | mawk_2017-10-31-132730_see3-54.crash added |
---|
mawk crash log
comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
I can confirm this. Runs fine when built locally on my Mac with 10.12.6 with Xcode 9.0.1. Crashes when using the binary produced by the buildbot, which runs 10.12.6 with Xcode 8.3.3. I haven't tested other OS versions.
comment:5 Changed 7 years ago by tobypeterson
Relevant code hasn't changed in quite a while. I suppose the older mawk releases were built with a different Xcode version. So it's a compiler bug, I assume? The code looks fine to me.
comment:6 Changed 7 years ago by tobypeterson
I got my hands on a VM where I can repro this. Same problem occurs with mawk-1.3.4-20161120.
comment:7 Changed 7 years ago by tobypeterson
mawk is using a dynamically-sized struct (last member is str[2]), which certain older clang versions don't like. Possible fixes include converting the affected strcpy calls to use memcpy, or perhaps disabling _FORTIFY_SOURCE.
comment:8 follow-up: 9 Changed 7 years ago by tobypeterson
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Disabled _FORTIFY_SOURCE
in [20d860625d3d6087809bfff4c578f70edf01a527/macports-ports].
We should undo that at some point.
comment:9 Changed 7 years ago by Schamschula (Marius Schamschula)
Replying to tobypeterson:
Disabled
_FORTIFY_SOURCE
in [20d860625d3d6087809bfff4c578f70edf01a527/macports-ports].We should undo that at some point.
Unfortunately, this has no effect on the Abort trap.
Should have mentioned: