Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
About 15 years ago I helped someone debug a small program that remained silent while it should produce output. So we added a few debugging print statements. The program ran correctly (printing beside the debugging messages, also the messages it should). Removed the debugging, no messages at all. So we did a binary search to find out what the minimum amount of debugging messages printed was necessary.

A bare minimum. Printing an additional empty string made the program work correctly. No additional printing, and the program would not print at all.

Fast forward to a few months ago. I was trying to get an open source program working on an embedded system. It kept crashing with segmentation faults. Added debugging print statements - and it ran fine. Remove them, crash. Put them elsewhere, crash. Moved to a different place, and it ran fine. Eventually, I ended up with putting the following code in the program:

if(i == 0) abort();
This is after a for loop that left i to be equal to 256.

In reply to Re: Call for Compiler Error Conundrums by Anonymous Monk
in thread Call for Compiler Error Conundrums by QM

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found