mattiasflodin/reckless

Consistent crash with example from README

Closed this issue · 3 comments

The library consistently crashes when example from README is built with it. All you need to change is print the s string in the loop (in addition to integer i) and increase the counter:

    for(int i=0; i!=10000000; ++i) { // <- Increase the counter to crash (change 1 of 2)
        reckless::scoped_indent indent;
        g_log.warn("Warning: %s, %d", s, i);    // <- Print s string to crash (change 2 of 2)
    }
  • Verified on Ubuntu 18.04 / gcc 9.5.0, also with gcc 8.3.0
  • The crash usually occurs at random counter number.
  • The crash seems to occur sooner when stdout_writer is used, later with file_writer.
  • Crashing stops as soon as string s gets longer than 16 characters.

@mattiasflodin Please let me know If I can provide any more info to replicate the crash.

Looks like the same issue as this. #36
I'm seeing this happen fairly frequently as well

The fact that you only get crashes when the string is 16 characters or less convinces me that this is a duplicate of #36, which is fixed in 3.0.3. Please retry with that version and reopen if the problem persists.