Bug 810950 - regex(3) triggers efence error
regex(3) triggers efence error
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Carlos O'Donell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-09 13:54 EDT by langley
Modified: 2016-11-24 07:45 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-02 15:17:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description langley 2012-04-09 13:54:16 EDT
Description of problem:

Using regcomp(3) with -lefence crashes.


Version-Release number of selected component (if applicable):

rpm -qf /usr/include/regex.h
glibc-headers-2.14.90-24.fc16.6.x86_64

rpm -qa ElectricFence
ElectricFence-2.2.2-32.fc16.x86_64


How reproducible:

Compile this program:
=====================

// re.c

#include <sys/types.h>
#include <regex.h>

char *regex = ".*";
int main()
{
  regex_t p_regex;
  regmatch_t pm[4];

  regcomp(&p_regex,regex,REG_EXTENDED|REG_ICASE|REG_NEWLINE);
  regexec(&p_regex,"abc",4,pm,0);
}


Link with efence:
=================

gcc re.c -lefence


Run:
====

ltrace ./a.out
(0, 0, 0, -1, 0x1f25bc2)                                                             = 0x30dfc23260
__libc_start_main(0x400624, 1, 0x7fff5e009a78, 0x400670, 0x400700 <unfinished ...>
regcomp(0x7fff5e009950, 0x400768, 7, 0x400768, 0x400700
  Electric Fence 2.2.2 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>

ElectricFence Aborting: Allocating 0 bytes, probably a bug.
 <no return ...>
--- SIGILL (Illegal instruction) ---
+++ killed by SIGILL +++


Works if you don't use libefence:
=================================
gcc re.c
ltrace ./a.out
(0, 0, 0, -1, 0x1f25bc2)                                                             = 0x30dfc23260
__libc_start_main(0x400524, 1, 0x7fffef5ca318, 0x400570, 0x400600 <unfinished ...>
regcomp(0x7fffef5ca1f0, 0x400668, 7, 0x400668, 0x400600)                             = 0
regexec(0x7fffef5ca1f0, 0x40066b, 4, 0x7fffef5ca1d0, 0)                              = 0
+++ exited (status 0) +++



Steps to Reproduce:
1. See above
2.
3.
  
Actual results:

See above

Expected results:

See above

Additional info:

From a casual Google search, this problem or similar problems seem
to have been reported throughout the last decade.
Comment 1 Mikolaj Izdebski 2012-12-19 09:41:18 EST
I believe that this bug was reported against wrong component (regexp is a 100% Pure Java Regular Expression package). Reassigning to glibc.
Comment 3 Fedora End Of Life 2013-01-16 11:54:26 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Fedora Admin XMLRPC Client 2013-01-28 15:07:44 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Fedora End Of Life 2013-12-21 03:35:00 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Carlos O'Donell 2014-01-02 15:17:18 EST
On F19 with valgrind or electricfence I detect no errors. Therefore I'm closing this.

Note You need to log in before you can comment on or make changes to this bug.