Ticket #175 (closed bug: Fixed)

Opened 10 years ago

Last modified 43 years ago

SIGSEGV in Text.Regex

Reported by: remit Owned by: simonmar
Priority: normal Milestone:
Component: hslibs/text Version: 6.0.1
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Hi all,

while writing a little download-some-weblog-program I
encountered what appears to be a memory management
bug in Text.Regex of ghc-6.0.1.

Both 6.0 and 6.0.1 crash. I didn't try other versions yet.

possible interesting information can be found at:

http://home.wanadoo.nl/remi.turk/tmp/LJGet/core.bz2
http://home.wanadoo.nl/remi.turk/tmp/LJGet/grepHref.bz2
http://home.wanadoo.nl/remi.turk/tmp/LJGet/grepHref.hs

If I need to provide additional information or isolate
the problem into a smaller code-fragment, please let me
know.

Happy hacking,
Remi

some gdb-info:

{- gdb copyright info... -}
Program terminated with signal 11, Segmentation fault.
{- reading symbols from... -}
#0  chunk_free (ar_ptr=0x0, p=0x4045cbf8) at malloc.c:3049
3049	malloc.c: No such file or directory.
(gdb) info stack
#0  chunk_free (ar_ptr=0x0, p=0x4045cbf8) at malloc.c:3049
#1  0x400f883e in __libc_free (mem=0x4045cc00) at
malloc.c:3023
#2  0x40132fd2 in __regfree (preg=0x40205058) at
regex.c:5866
#3  0x805720f in s686_info ()
#4  0x805a4f0 in s4zy_ret ()
#5  0x4c58308 in ?? ()
Cannot access memory at address 0x99548be

Change History

Changed 10 years ago by simonmar

Logged In: YES 
user_id=48280

Strange - I thought I fixed this bug between 6.0 and 6.0.1.  
You're absolutely certain it happens with 6.0.1?

The URLs in your bug report don't work.

Changed 10 years ago by hampusr

Logged In: YES 
user_id=159064

I too get a sigsegv when I run the given code (the links
work just fine for me) and I've tried with both ghc 6.0.1
and CVS version from about a week ago.

Changed 10 years ago by remit

Logged In: YES 
user_id=26642

*verifying*
yes it does crash with 6.0.1.
I can reach the files without any problem, both from home
and from university. Are they still unreachable?

Changed 10 years ago by simonmar

  • status changed from assigned to closed
Logged In: YES 
user_id=48280

Yes, it is indeed a separate bug.  I've just fixed it in the
HEAD, but I'm afraid there isn't a workaround for 6.0.1. 
Text.Regex is sadly broken, *sigh*.

The URLs in the bug report were unreadable from here because
our proxy is blocking that site, for some unknown reason.

Changed 10 years ago by remit

Logged In: YES 
user_id=26642

thanks, I'll take a look at GHC-CVS soon I guess :)
Note: See TracTickets for help on using tickets.