Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[solved] access violation using -start greater as text len

Closed / Fixed3475667fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-01-19 01:37:25
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.
sebresplain2012-01-19 08:37:26
File Added - 433422: tclCmdMZ.c.patch
sebres Ticket [3475667fff]: 1 change [History diff]2012-01-19 08:40:00
dgpplain2012-01-20 01:40:22
confirmed bug.
dgpplain2012-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.
sebresplain2012-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?
nijtmansplain2012-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
dgpplain2012-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?
dgpplain2012-01-24 04:22:45
allow_comments - 1

Now I can follow the cases more easily.
Log in (anonymous is fine) to add a comment.

Attachments: