Tcl Source Code

View Ticket
Login
Ticket UUID: 3475667
Title: [solved] access violation using -start greater as text len
Type: Bug Version: obsolete: 8.5.11
Submitter: sebres Created on: 2012-01-19 01:37:25
Subsystem: 43. Regexp Assigned To: dgp
Priority: 3 Low Severity:
Status: Closed Last Modified: 2012-01-24 04:22:45
Resolution: Fixed Closed By: dgp
    Closed on: 2012-01-23 21:22:45
Description:
Problem Behavior: 
command "regexp" exception bug (Access Violation) executing folowing code:
<code>
   set s 590000
   regexp -start $s -indices {\s\m\S} [string repeat " " 580000] wortpos
<code>

Tcl Version: ALL KNOWN (solved in 8.5.11)
OS Platform: ANY

Comment: If could be not reproduced on some platforms, still more enlarge value of "s". On win32 could not be reproduced in debugger of visual studio, but in borland. 
On debian applies to both - release and debug.

Solution: see attached patch.
User Comments: dgp added on 2012-01-24 04:22:45:

allow_comments - 1

Now I can follow the cases more easily.

dgp added on 2012-01-24 01:03:47:

allow_comments - 0

Thanks for pushing the merges, Jan.  All branches should now
avoid the access violation.

I was slow because I've been also looking ways to simplify the
logic along the lines of the contributed patch.  So far my attempts
(when no interrupted by life) have been failing tests,

sebres, are you wanting Developer status so you can claim bugs
in this Tracker?  Or are you wanting commit access?  Or both?
You should be aware that development of the Tcl sources happens
at http://core.tcl.tk/ now.  Have you already cloned that?

nijtmans added on 2012-01-21 15:24:00:

allow_comments - 1

committed to core-8-4-branch by dgp (2012-01-19).

Now (2012-01-21) merged to core-8-5-branch
and trunk as well

sebres added on 2012-01-20 18:26:27:
Thanks.
I develop my own tcl object solution (not yet open source ready), which is strongly bound with tcl core, and have therefore own tcl85mod, which will be additionaly tested with own extended test cases. 
If I back time, I can make some parts of my test suite compatible with standard tcl.

In addition: I would like to join to the project as a developer, can you add me to this group?

dgp added on 2012-01-20 02:14:03:
Good catch.  Wish we had (or I knew about) more reliable
ways to test this sort of thing in the test suite.

dgp added on 2012-01-20 01:40:22:
confirmed bug.

sebres added on 2012-01-19 08:37:26:

File Added - 433422: tclCmdMZ.c.patch

Attachments: