-
Notifications
You must be signed in to change notification settings - Fork 9
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
Triple fault in flanterm_fb_init #11
Comments
This is very likely not a Flanterm issue. Make sure your provided |
I believe that Zig's |
@mintsuki Okay, can confirm that it's something wrong with the flanterm library itself because somewhere it's invoking undefined behavior. Normally when Zig builds code it enables the UB sanitizer (which is obviously particularly important in C code). If I pass |
Update: okay, so it's working fine for me (with UB sanitizer off) but it just doesn't work properly for me with |
When I initialize flanterm as demonstrated in the README but adapted for Zig, like so:
A triple fault occurs, at least when built in debug mode. When built in release safe mode, the system just hangs. Qemu says this about the triggered interrupt:
The data that's passed to the first flanterm_fb_init call is:
(Why there are 30 video modes is beyond me.) After lots of digging into Flanterm's FB backend code, it appears that the error occurs sometime in the flanterm_fb_full_refresh function, specifically, I believe, in the plot_char call. Line 456 does:
And appears to just assume that the canvas is set, from what I can tell. But I may be wrong here; I'm not positive if I'm quite getting the right lines or not.
The text was updated successfully, but these errors were encountered: