Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large amount of warnings lead to stack overflow when using json-messages #676

Closed
michael-schwarz opened this issue Apr 5, 2022 · 2 comments
Assignees
Milestone

Comments

@michael-schwarz
Copy link
Member

Discovered during goblint/bench#18, re-posting it here so we have a place to reference to.

A possible execution that triggers this bug ./goblint ../FFmpeg --disable ana.base.context.non-ptr --disable sem.unknown_function.spawn --set ana.thread.domain plain --enable exp.earlyglobs --set ana.base.privatization none --enable dbg.print_dead_code --set cppflags[+] -DGOBLINT_NO_BSEARCH --set cppflags[+] -DGOBLINT_NO_ASSERT --set cppflags[+] -UHAVE_INLINE_ASM --set result json-messages --set ana.ctx_insens[+] base -v


The stackoverflow happens inside

      Yojson.Safe.pretty_to_channel ~std:true out json

(at

Yojson.Safe.pretty_to_channel ~std:true out json
).
So just using BatList.map would not cut it as the call happens inside a library.

Originally posted by @michael-schwarz in goblint/bench#18 (comment)


[Maybe] it's just specific to pretty_to_channel. Could be that the minimal output of to_channel doesn't suffer from the same issue.

Originally posted by @sim642 in goblint/bench#18 (comment)

@sim642
Copy link
Member

sim642 commented Apr 6, 2022

Weird, both yojson and ppx_deriving_yojson have had issues about stack overflows, but they've also been fixed:

@sim642
Copy link
Member

sim642 commented Apr 6, 2022

Oh, damn, I didn't realize that the last release of yojson (1.7.0) is three years old. The current master version wouldn't have this problem.
Still, I think to_channel should be implemented imperatively and iteratively, so it shouldn't have the issue.

@sim642 sim642 self-assigned this Apr 6, 2022
@sim642 sim642 closed this as completed in 5162202 Apr 6, 2022
@sim642 sim642 added this to the v2.0.0 milestone Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants