Skip to content

Instantly share code, notes, and snippets.

@jkeenan
Created November 7, 2016 21:06
Show Gist options
  • Save jkeenan/ffef9a0d6d533b6a37fd6fadf1e457e9 to your computer and use it in GitHub Desktop.
Save jkeenan/ffef9a0d6d533b6a37fd6fadf1e457e9 to your computer and use it in GitHub Desktop.
valgrind around script with panic
$ valgrind $PERL -w ../texi2any.pl --set-customization-variable=TEXI2HTML --force --conf-dir ./../t/init/ --conf-dir ./../init -I formatting// -I ./ --set-customization-variable L2H_FILE=./../t/init/l2h.init --error-limit=1000 --set-customization-variable TEST=1 --set-customization-variable L2H_CLEAN=0 --output formatting//out_parser/simplest_test_prefix_info/ --info --set-customization-variable 'PREFIX truc' ./formatting//simplest.texi
==1502== Memcheck, a memory error detector
==1502== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==1502== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==1502== Command: /home/jkeenan/testing/a5540cf/bin/perl -w ../texi2any.pl --set-customization-variable=TEXI2HTML --force --conf-dir ./../t/init/ --conf-dir ./../init -I formatting// -I ./ --set-customization-variable L2H_FILE=./../t/init/l2h.init --error-limit=1000 --set-customization-variable TEST=1 --set-customization-variable L2H_CLEAN=0 --output formatting//out_parser/simplest_test_prefix_info/ --info --set-customization-variable PREFIX\ truc ./formatting//simplest.texi
==1502==
Compiling REx "([^\S\x{202f}\x{00a0}]+)|(\p{InFullwidth})|((?:[^\s\p{InFull"...
Final program:
1: BRANCH (18)
2: OPEN1 (4)
4: PLUS (16)
5: ANYOF[\t\n\x0B\f\r \x85][1680 2000-200A 2028-2029 205F 3000] (0)
16: CLOSE1 (68)
18: BRANCH (34)
19: OPEN2 (21)
21: ANYOF[+utf8::Texinfo::Convert::ParagraphNonXS::InFullwidth] (32)
32: CLOSE2 (68)
34: BRANCH (FAIL)
35: OPEN3 (37)
37: CURLYM[0]{1,INFTY} (66)
39: BRANCH (51)
40: ANYOF[^\t\n\x0B\f\r \x85\xA0{+utf8::Texinfo::Convert::ParagraphNonXS::InFullwidth}1680 2000-200A 2028-2029 202F 205F 3000] (64)
51: BRANCH (FAIL)
52: ANYOF[\xA0][202F] (64)
63: TAIL (64)
64: SUCCEED (0)
65: NOTHING (66)
66: CLOSE3 (68)
68: END (0)
minlen 1
Compiling REx "\n"
Final program:
1: EXACT <\n> (3)
3: END (0)
anchored "%n" at 0 (checking anchored isall) minlen 1
Compiling REx "\n"
Final program:
1: EXACT <\n> (3)
3: END (0)
anchored "%n" at 0 (checking anchored isall) minlen 1
Compiling REx "[\n\r]"
Final program:
1: ANYOF[\n\r] (12)
12: END (0)
stclass ANYOF[\n\r] minlen 1
Compiling REx "^[\n\r]"
Final program:
1: SBOL /^/ (2)
2: ANYOF[\n\r] (13)
13: END (0)
stclass ANYOF[\n\r] anchored(SBOL) minlen 1
Compiling REx "\n"
Final program:
1: EXACT <\n> (3)
3: END (0)
anchored "%n" at 0 (checking anchored isall) minlen 1
Compiling REx "[[:upper:]]"
Final program:
1: POSIXD[:upper:] (2)
2: END (0)
stclass POSIXD[:upper:] minlen 1
Matching REx "([^\S\x{202f}\x{00a0}]+)|(\p{InFullwidth})|((?:[^\s\p{InFull"... against "This is "
0 <> <This is > | 0| 1:BRANCH(18)
0 <> <This is > | 1| 2:OPEN1(4)
0 <> <This is > | 1| 4:PLUS(16)
| 1| ANYOF[\t\n\x0B\f\r \x85][1680 2000-200A 2028-2029 205F 3000] can match 0 times out of 2147483647...
| 1| failed...
0 <> <This is > | 0| 18:BRANCH(34)
0 <> <This is > | 1| 19:OPEN2(21)
0 <> <This is > | 1| 21:ANYOF[+utf8::Texinfo::Convert::ParagraphNonXS::InFullwidth](32)
| 1| failed...
0 <> <This is > | 0| 34:BRANCH(68)
0 <> <This is > | 1| 35:OPEN3(37)
0 <> <This is > | 1| 37:CURLYM[0]{1,INFTY}(66)
0 <> <This is > | 2| 39:BRANCH(51)
0 <> <This is > | 3| 40:ANYOF[^\t\n\x0B\f\r \x85\xA0{+utf8::Texinfo::Convert::ParagraphNonXS::InFullwidth}1680 2000-200A 2028-2029 202F 205F 3000](64)
Modification of a read-only value attempted at ../../tp/Texinfo/Convert/ParagraphNonXS.pm line 329.
panic: POPSTACK
==1502==
==1502== HEAP SUMMARY:
==1502== in use at exit: 19,327,354 bytes in 68,317 blocks
==1502== total heap usage: 226,817 allocs, 158,500 frees, 41,823,490 bytes allocated
==1502==
==1502== LEAK SUMMARY:
==1502== definitely lost: 0 bytes in 0 blocks
==1502== indirectly lost: 0 bytes in 0 blocks
==1502== possibly lost: 12,431,025 bytes in 15,199 blocks
==1502== still reachable: 6,896,329 bytes in 53,118 blocks
==1502== of which reachable via heuristic:
==1502== newarray : 198,600 bytes in 5,620 blocks
==1502== suppressed: 0 bytes in 0 blocks
==1502== Rerun with --leak-check=full to see details of leaked memory
==1502==
==1502== For counts of detected and suppressed errors, rerun with: -v
==1502== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
@jkeenan
Copy link
Author

jkeenan commented Nov 7, 2016

Reformatting the command:

valgrind $PERL -w -d ../texi2any.pl \
        --set-customization-variable=TEXI2HTML  \
        --force  \
        --conf-dir ./../t/init/  \
        --conf-dir ./../init -I formatting// -I ./  \
        --set-customization-variable L2H_FILE=./../t/init/l2h.init  \
        --error-limit=1000  \
        --set-customization-variable TEST=1  \
        --set-customization-variable L2H_CLEAN=0   \
        --output formatting//out_parser/simplest_test_prefix_info/  \
        --info  \
        --set-customization-variable 'PREFIX truc' ./formatting//simplest.texi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment