[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on A
From: |
Colin Macdonald |
Subject: |
[Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture |
Date: |
Thu, 4 Jan 2018 14:28:08 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 |
URL:
<http://savannah.gnu.org/bugs/?52810>
Summary: regexprep: incorrect empty tokens on ARM
architecture
Project: GNU Octave
Submitted by: cbm
Submitted on: Thu 04 Jan 2018 07:28:06 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: GNU/Linux
_______________________________________________________
Details:
When a token should be empty, it sometimes contains a single character (which
seems to come from the next token). This happens on ARM but not on x86.
I will attach a mwe.m of the following example.
Consider a string like:
s1 =
abcdef
Xkey
abcdef
Xkey
abcdef
abcdef
Xkey
abcdef
%% find <whitespace>Xkey and put some underscores in
s2 = regexprep(s1, '^([ \t]*)(Xkey)$', '___$1___$2___', ...
"dotexceptnewline", "emptymatch", "lineanchors")
On x86, we get:
s2 =
abcdef
___ ___Xkey___
abcdef
___ ___Xkey___
abcdef
abcdef
______Xkey___
abcdef
On ARM we get a different and wrong result:
s2 =
abcdef
___ ___Xkey___
abcdef
___ ___Xkey___
abcdef
abcdef
___X___Xkey___
abcdef
Note that extra "X" on the penultimate line. "$1" is incorrect.
I've hit this or very similar bugs on earlier version of Octave (at least
4.0). I don't have 4.3.0+ built on ARM but I suspect its still present there
too.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 04 Jan 2018 07:28:06 PM UTC Name: mwe.m Size: 645B By: cbm
<http://savannah.gnu.org/bugs/download.php?file_id=42833>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52810>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture,
Colin Macdonald <=
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Rik, 2018/01/04
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Colin Macdonald, 2018/01/05
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Colin Macdonald, 2018/01/06
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Rik, 2018/01/06
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Rik, 2018/01/12
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Colin Macdonald, 2018/01/15
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Rik, 2018/01/15
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Colin Macdonald, 2018/01/15
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Colin Macdonald, 2018/01/15
- [Octave-bug-tracker] [bug #52810] regexprep: incorrect empty tokens on ARM architecture, Rik, 2018/01/15