Segfault on pcregrep -M '(.|\n)*' /dev/zero

Bug #329243 reported by Anders Kaseorg
6
Affects Status Importance Assigned to Milestone
pcre3 (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

$ pcregrep -M '(.|\n)*' /dev/zero
Segmentation fault (core dumped)

Reproduced on several machines.

ProblemType: Crash
Architecture: amd64
Dependencies:
 libgcc1 1:4.3.3-3ubuntu5
 gcc-4.3-base 4.3.3-3ubuntu5
 libpcre3 7.8-2ubuntu1
 findutils 4.4.0-2ubuntu3
 libc6 2.9-0ubuntu9
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/pcregrep
NonfreeKernelModules: nvidia openafs
Package: pcregrep 7.8-2ubuntu1
ProcCmdline: pcregrep -M (.|\\n)* /dev/zero
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LC_TIME=en_DK.UTF-8
Signal: 11
SourcePackage: pcre3
StacktraceTop:
 ?? () from /lib/libpcre.so.3
 ?? () from /lib/libpcre.so.3
 ?? () from /lib/libpcre.so.3
 ?? () from /lib/libpcre.so.3
 ?? () from /lib/libpcre.so.3
Title: pcregrep crashed with SIGSEGV
Uname: Linux 2.6.28-7-generic x86_64
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse kvm lpadmin netdev plugdev powerdev pulse pulse-access pulse-rt scanner tape video

Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:match (eptr=0x7fff754b74b8 "", ecode=0x119597f "V",
match (eptr=0x7fff754b74b7 "", ecode=0x1195974 "_",
match (eptr=0x7fff754b74b7 "", ecode=0x119597f "V",
match (eptr=0x7fff754b74b6 "", ecode=0x1195974 "_",
match (eptr=0x7fff754b74b6 "", ecode=0x119597f "V",

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Changed in pcre3:
importance: Undecided → Medium
Revision history for this message
Anders Kaseorg (andersk) wrote :

This looks like a stack overflow. Apparently, the upstream developers don’t in general consider stack overflows to be a bug:
<http://bugs.exim.org/show_bug.cgi?id=797>

The crash can be avoided by configuring pcre with --disable-stack-for-recursion. However, the documentation says that “PCRE runs noticeably more slowly when built in this way”.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Reported upstream anyway: <http://bugs.exim.org/show_bug.cgi?id=810>

Revision history for this message
dino99 (9d9) wrote :

This version has died long ago; no more supported

Changed in pcre3 (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.