[Upstream] Regex Find & Replace foo[^\[:alpha:\]] causes Writer to become unresponsive

Bug #669849 reported by Holstener Liesel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
High
libreoffice (Ubuntu)
Fix Released
Medium
Björn Michaelsen
openoffice.org (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: openoffice.org

1) lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

2) apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.4.3-3ubuntu2
  Candidate: 1:3.4.3-3ubuntu2
  Version table:
 *** 1:3.4.3-3ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen in LibreOffice Writer via the Terminal:

cd ~/Desktop && lowriter -nologo

Ctrl+F -> Search bar box foo[^\[:alpha:\]] -> click More Options button -> checked Regular expressions checkbox -> clicked Find button

and it fails quickly and gracefully.

4) What happens instead is Writer becomes and remains unresponsive.

ORIGINAL REPORTER COMMENTS: On my system this will reliably crash soffice.bin. I realize the example regex is probably not a good idea in the first place, but that shouldn't crash the application.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: openoffice.org-core 1:3.2.0-7ubuntu4.1
Uname: Linux 2.6.35-020635-generic x86_64
Architecture: amd64
Date: Tue Nov 2 11:10:23 2010
ExecutablePath: /usr/lib/openoffice/program/soffice.bin
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 LANGUAGE=de:de_DE:en_GB:en
 PATH=(custom, no user)
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: openoffice.org

Revision history for this message
Holstener Liesel (holstenerliesel) wrote :
description: updated
Revision history for this message
penalvch (penalvch) wrote :

Issue reproducible in Ubuntu 11.04, LibreOffice Writer at the Terminal:

lowriter -nologo

Ctrl+F -> Search bar box foo[^\[:alpha:\]] -> click More Options button -> checked Regular expressions checkbox -> clicked Find button

Writer became unresponsive, after 10 minutes killed the process.

lsb_release -rd
Description: Ubuntu natty (development branch)
Release: 11.04

apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.3.0-1ubuntu1
  Candidate: 1:3.3.0-1ubuntu1
  Version table:
 *** 1:3.3.0-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status

tags: added: lo33
summary: - Regex Find & Replace crashes OOo writer
+ Regex Find & Replace crashes Writer
Revision history for this message
papukaija (papukaija) wrote : Re: Regex Find & Replace crashes Writer

This bug is related to bug 465309

Changed in openoffice.org (Ubuntu):
status: New → Won't Fix
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote : migrating packaging from OpenOffice.org to Libreoffice

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

penalvch (penalvch)
summary: - Regex Find & Replace crashes Writer
+ Regex Find & Replace causes Writer to become unresponsive
penalvch (penalvch)
description: updated
Changed in libreoffice (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
summary: - Regex Find & Replace causes Writer to become unresponsive
+ Regex Find & Replace foo[^\[:alpha:\]] causes Writer to become
+ unresponsive
Revision history for this message
In , penalvch (penalvch) wrote :

Downstream bug may be found at:

https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/669849

1) lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

2) apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.4.3-3ubuntu2
  Candidate: 1:3.4.3-3ubuntu2
  Version table:
 *** 1:3.4.3-3ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen in LibreOffice Writer via the Terminal:

cd ~/Desktop && lowriter -nologo

Ctrl+F -> Search bar box foo[^\[:alpha:\]] -> click More Options button -> checked Regular expressions checkbox -> clicked Find button

and it fails quickly and gracefully.

4) What happens instead is Writer becomes and remains unresponsive.

summary: - Regex Find & Replace foo[^\[:alpha:\]] causes Writer to become
- unresponsive
+ [Upstream] Regex Find & Replace foo[^\[:alpha:\]] causes Writer to
+ become unresponsive
Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

[Reproducible] with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) English UI [(Build ID: d3d1481-3f8994a-2ba0a9f)]" (110909)

Also [Reproducible] with "LibreOffice 3.4.3 - WIN7 Home Premium (64bit) German UI [OOO340m1 (Build:302)]" CALC

Changed in df-libreoffice:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Koehlerkarl (koehlerkarl) wrote :

This may be simplified: regex-search for

[[:\]

The following (inline) patch avoids the infinite loop, by advancing the starting point if we fall into the [: a second time.

--- a/regexp/source/reclass.cxx
+++ b/regexp/source/reclass.cxx
@@ -1255,6 +1255,7 @@ Regexpr::regex_compile()
         break;
       } else {
         p = p1+1;
+ p1 ++;
         last_char = (sal_Unicode)':';
         set_list_bit(last_char, b);
       }

Revision history for this message
In , Eike Rathke (erack) wrote :
Changed in df-libreoffice:
status: Confirmed → Fix Released
Changed in libreoffice (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

Fixed as per upstream 3.5.0 released with precise.

Changed in libreoffice (Ubuntu):
assignee: nobody → Björn Michaelsen (bjoern-michaelsen)
status: Fix Committed → Fix Released
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.