Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I don't have a windoze box. On Linux with 5.8.8 I do see the warn "Insecure dependency in kill while running with -T switch at /usr/lib/perl5/site_perl/5.8.8/WWW/ line 2446." I do not see a crash, but valgrind (which is a utility that interprets machine code and checks all memory accesses carefully) says that there just after that warn, there are some reads of memory that was free()ed, which is a bug that could easily cause a crash.

On Linux with 5.16.0 that warn is not there and valgrind's report is clean. So you'll probably find it's fixed if you upgrade. (I remember this valgrind-complains-under-taint symptom coming up on perl5-porters, in fact, and it was fixed.)

I set my tool to look for the message and it was confused by the fact that either "warn;" can cause the message to appear. This causes the message under 5.8.8:

#!/usr/bin/env perl -T use strict; use WWW::Mechanize; my $ua = WWW::Mechanize->new(); my $url = shift; $ua->get($url); warn;
But this code does not cause valgrind to complain. So I made the tool use valgrind (much slower) and it says the invalid memory access has this shortest script:
#!/usr/bin/env perl -T use strict; use WWW::Mechanize; my $ua = WWW::Mechanize->new(); my $url = shift; $ua->get($url); my $pager = parsepage($ua); sub parsepage { my $so = join "\n", $ua->content =~/(so\.addVariable\(\s*'.+?'\s*, +\s*'.+?'\s*\)\s*;)/mg; while($so =~/so\.addVariable\('([^']+)','([^']+)'\);/mg) { } }
And, interestingly enough, whether it shows the bug depends on the name of the script! So it's very sensitive to memory layout.

Anyway, thanks, now I've figured out how to add valgrind and taint, and hopefully I'll release this script to the public in a few days.

In reply to Re^2: Producing minimal examples for crashers by wumpus
in thread Producing minimal examples for crashers by wumpus

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Corion]: Yay! As I had to reset my phone again, I now also back up my SMS automatically. Highly conveniently, there is a program to back up my SMS to my IMAP server as mails ;)
    [1nickt]: Corion this is an android phone? If so, are you encountering problems with recent upgrades? Lately my phone dies suddenly quite often, seemingly coredumps caused by interaction of two actions, eg phone playing a sound and user swiping simultaneously :-/

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (5)
    As of 2017-11-18 15:07 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (277 votes). Check out past polls.