Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883993 - dev-util/colm-0.14.7-r2: Double free or corruption during build
Summary: dev-util/colm-0.14.7-r2: Double free or corruption during build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 839048
  Show dependency tree
 
Reported: 2022-12-02 09:43 UTC by Frederik Pfautsch
Modified: 2024-02-29 07:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,338.54 KB, text/plain)
2022-12-02 09:44 UTC, Frederik Pfautsch
Details
emerge --info (emerge-info.txt,24.14 KB, text/plain)
2022-12-02 09:44 UTC, Frederik Pfautsch
Details
emerge --info (info.txt,10.36 KB, text/plain)
2022-12-03 09:57 UTC, Fab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Pfautsch 2022-12-02 09:43:39 UTC
Build aborts with "double free or corruption (!prev)":

make[2]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/aapl.d'
Making all in colm.d
make[2]: Entering directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/colm.d'
sedsubst: generating gentests from gentests.sh
make[2]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/colm.d'
Making all in rlhc.d
make[2]: Entering directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/rlhc.d'
../../src/colm -b rlhc_object -o rlhc rlhc.lm
double free or corruption (!prev)
make[2]: *** [Makefile:1703: rlhc] Aborted
make[2]: *** Deleting file 'rlhc'
make[2]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/rlhc.d'
make[1]: *** [Makefile:438: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test'
make: *** [Makefile:486: all-recursive] Error 1

Reproducible: Always
Comment 1 Frederik Pfautsch 2022-12-02 09:44:30 UTC
Created attachment 838893 [details]
build.log
Comment 2 Frederik Pfautsch 2022-12-02 09:44:42 UTC
Created attachment 838895 [details]
emerge --info
Comment 3 Volker Hemmann 2022-12-03 00:47:11 UTC
I get:
make[2]: Entering directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/colm.d'
sedsubst: generating gentests from gentests.sh
make[2]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/colm.d'
Making all in rlhc.d
make[2]: Entering directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/rlhc.d'
../../src/colm -b rlhc_object -o rlhc rlhc.lm
free(): invalid next size (normal)
make[2]: *** [Makefile:1703: rlhc] Aborted
make[2]: *** Deleting file 'rlhc'
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-03 01:36:03 UTC
I'm wondering what caused this all of a sudden. I can't reproduce it right now.

I wonder if this was fixed just a moment ago by:

commit 6e8855971f7a26e1fb5b051bae0346a22a4f83f9
Author: Sam James <sam@gentoo.org>
Date:   Sat Dec 3 00:53:53 2022 +0000

    app-alternatives/lex: fix lex symlink on non-merged-usr

    Signed-off-by: Sam James <sam@gentoo.org>
Comment 5 Volker Hemmann 2022-12-03 05:55:45 UTC
installed app-alternative/lex which also forced me to install sys-devel/flex-2.6.4-r5:

no change.
Comment 6 Fab 2022-12-03 09:57:00 UTC
Created attachment 839217 [details]
emerge --info

Hi,

Just to say that I'm getting the exact same error with the attached emerge --info
You should also note that dev-util/colm-0.14.7 is building fine while -r2 don't.

When trying to run the same command from the ebuild WORKDIR with debug symbols on, I'm getting :

> # /var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/test/rlhc.d # ../../src/colm -d -b rlhc_object -o rlhc rlhc.lm
> compiling with: 'x86_64-pc-linux-gnu-gcc -march=x86-64 -mtune=generic -O2 -pipe -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpclmul -mpopcnt -msse4.2 -msse4.1 -mfxsr -fstack-protector-strong -mno-3dnow -mno-sse4a -mno-movbe -mno-aes -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -Wall -Wwrite-strings -g -o rlhc rlhc.c -I/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/../aapl -I/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/include -L/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/.libs /var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/.libs/libcolm.so'
> free(): invalid next size (normal)
> Abandon (core dumped)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-03 10:10:21 UTC
oh, I completely missed bug 883883.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-03 10:10:44 UTC
(In reply to Sam James from comment #7)
> oh, I completely missed bug 883883.

Does ragel-7.0.4-r2 help?
Comment 9 Fab 2022-12-03 10:30:35 UTC
(In reply to Sam James from comment #8)
> (In reply to Sam James from comment #7)
> > oh, I completely missed bug 883883.
> 
> Does ragel-7.0.4-r2 help?

ragel-7.0.4-r2 pulls in >=dev-util/colm-0.14.7-r1, which also fails with Double free or corruption
Comment 10 Larry the Git Cow gentoo-dev 2022-12-03 11:03:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56f9308d38ba0c71b6109596185c9feffafb2bfc

commit 56f9308d38ba0c71b6109596185c9feffafb2bfc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-03 11:03:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-03 11:03:28 +0000

    dev-util/colm: destabilize 0.14.7-r2
    
    Crash reports
    
    Bug: https://bugs.gentoo.org/839048
    Bug: https://bugs.gentoo.org/883883
    Bug: https://bugs.gentoo.org/883993
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/colm/colm-0.14.7-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 11 Volker Hemmann 2022-12-03 20:11:39 UTC
thanks for pulling colm.

If you think it got fixed, drop a comment, I am more than willing to spend some cpu cycles ;)
Comment 12 Pacho Ramos gentoo-dev 2023-05-19 10:00:46 UTC
Are you still hitting this?

I don't know why I don't see this issues with dev-util/ragel-7.0.4-r2 and dev-util/colm-0.14.7-r2
Comment 13 Fab 2023-05-19 19:47:10 UTC
(In reply to Pacho Ramos from comment #12)
> Are you still hitting this?

Yes.

In -r2 ebuild, if I comment the following line in src_prepare() :
> sed -i -e "s|gcc|$(tc-getCC) ${CFLAGS}|" src/main.cc || die

The result is :
>  make[1]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7'
> >>> Source compiled.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-19 20:10:13 UTC
Oh, interesting!
Comment 16 Fab 2023-05-19 20:32:47 UTC
-r2 builds and installs fine if I remove -fstack-protector-strong from my CFLAGS, but OP does not have it in his own CFLAGS.
Comment 17 Larry the Git Cow gentoo-dev 2023-05-20 05:09:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6693c3cc856e6328d7054c2e8224a4c93bf1315f

commit 6693c3cc856e6328d7054c2e8224a4c93bf1315f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-20 04:56:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-20 04:56:43 +0000

    dev-util/colm: don't inject CFLAGS to main.cc
    
    Causes crashes with some combinations.
    
    Closes: https://bugs.gentoo.org/883993
    Bug: https://bugs.gentoo.org/766069
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/colm/colm-0.14.7-r3.ebuild | 69 +++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
Comment 18 Larry the Git Cow gentoo-dev 2024-02-29 07:34:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a1e08ac5ed37555aafc8f09748fb942d9b7255c

commit 1a1e08ac5ed37555aafc8f09748fb942d9b7255c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-29 07:30:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-29 07:33:54 +0000

    dev-util/colm: filter LTO, no-SA
    
    ragel and colm are *very* fragile.
    
    Bug: https://bugs.gentoo.org/858341
    Bug: https://bugs.gentoo.org/883993
    Bug: https://bugs.gentoo.org/924163
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/colm/colm-0.14.7-r3.ebuild | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d333828408e6230ce3a7aef9ce6fba2fb5ec945

commit 5d333828408e6230ce3a7aef9ce6fba2fb5ec945
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-29 07:29:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-29 07:33:54 +0000

    dev-util/ragel: filter LTO, no-SA
    
    ragel and colm are *very* fragile.
    
    Bug: https://bugs.gentoo.org/858341
    Bug: https://bugs.gentoo.org/883993
    Bug: https://bugs.gentoo.org/924163
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/ragel/ragel-7.0.4-r3.ebuild | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)