Bug 499689
| Summary: | memchr(0,'a',0) evokes segfault | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jim Meyering <meyering> |
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | bruno, fweimer, jakub |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-05-11 23:38:31 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
There is an email thread about this issue starting at http://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00081.html A related but different issue is https://bugzilla.redhat.com/show_bug.cgi?id=500136 This one is undefined behavior, yet works as it used to work again in glibc 2.10.1 in rawhide. Thanks. |
Description of problem: memchr(0, 'a', 0) can evoke a segfault Version-Release number of selected component (if applicable): glibc-headers-2.9.90-22.x86_64 How reproducible: every time Steps to Reproduce: $ cat k.c #include <string.h> int main() { return !!(memchr (0, 'a', 0)); } $ gcc -O k.c; ./a.out Actual results: Segmentation fault [Exit 139 (SIGSEGV)] Expected results: no segfault Additional info: