Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1647395
Summary: | glibc: the execution continued with double free in the program | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Shuai Song <songshuaishuai2> |
Component: | glibc | Assignee: | Carlos O'Donell <codonell> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | aoliva, arjun.is, codonell, dj, fweimer, law, mfabian, pfrankli, rth, siddhesh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | glibc-2.28-23.fc29 glibc-2.27-36.fc28 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-12-02 08:27:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Shuai Song
2018-11-07 11:52:43 UTC
I think MALLOC_CHECK_=1 should disable the tcache. DJ, what do you think? I think it makes sense to bypass the tcache when debugging malloc-using applications (so that mcheck sees all the activity), but that doesn't preclude the need to fix tcache to detect these problems too. (In reply to DJ Delorie from comment #2) > I think it makes sense to bypass the tcache when debugging malloc-using > applications (so that mcheck sees all the activity), but that doesn't > preclude the need to fix tcache to detect these problems too. Thanks a lot for your and Florian's comment. I can't understand the relationship between my question and your reply about 'tcache'.(what is the tcache?) as `man 3p free` saying: ``` Any use of a pointer that refers to freed space results in undefined behavior. ``` All I want to know is whether glic-2.27 do some special changes about both the MALLOC_CHECK_=1 and MALLOC_CHECK_=0 on the 'undefined behavior' compared to older version . if any,what is the changes? and are they reasonable? So I can fix my testcase according to the new undefined behavior Hope that helps. tcache is a per-thread cache added to malloc in glibc 2.26. It sits between the application and the core allocator, so it can affect how some things behave. Since _MALLOC_CHECK is implemented in the core allocator, the tcache causes some malloc/free calls to not be seen by _MALLOC_CHECK. tcache havs chanege the default behavior of freeing the freed memory. Are the changes acceptable and reasonable? What's your opinion? (In reply to Shuai Song from comment #5) > tcache havs chanege the default behavior of freeing the freed memory. > Are the changes acceptable and reasonable? What's your opinion? Yes, the changes are acceptable. The tcache performance improvement is important and the behaviour of a double-free is undefined and so we make use of this to provide as much performance as possible. DJ has just posted a ligh-weight check for double-free from the same thread: https://www.sourceware.org/ml/libc-alpha/2018-11/msg00118.html So there are some improvements we can make, but they will be limited and we don't want to reduce performance. I'm moving this bug to Rawhide and we'll fix it there, but we will not backport to Fedora 28. We may backport this to Fedora 29 depending on the final form of the changes. glibc-2.28-23.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c69aee3e63 glibc-2.28-23.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c69aee3e63 glibc-2.28-23.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. glibc-2.27-36.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2efb53dc71 glibc-2.27-36.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2efb53dc71 glibc-2.27-37.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2efb53dc71 glibc-2.27-37.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. |