-
Notifications
You must be signed in to change notification settings - Fork 952
fmt.Println causes SIGSEGV with target=arduino #349
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
Comments
Some initial testing. This code doesn’t seem to work on my Arduino board. Still debugging. Due to tinygo-org/tinygo#349 the interface feels cumbersome. Until we understand how to work with white LEDs, there are a couple of interfaces. It’s all an experiment
This is a limitation of the AVR backend in TinyGo. It has many bugs and limitations being a relatively new backend that doesn't get as much love as it should. I don't think there is a lot we can do about that, except wait for it to improve (or help it improve). |
By the way, the issue here is probably the use of the |
Oh! You're right. The bug was simplest reproduction:
|
When building with a copy of LLVM with asserts on, we get some more information:
|
I think we hit some UB inside of LLVM, am adding some asserts into the relevant pass |
Hey, there! Is there a workaround for formatting numbers? I need to output numbers in binary and hexadecimal, not decimal. I am runninng on an ATMega2560 |
This example no longer segfaults the compiler and #2389 is tracking the actual error message produced by the compiler. |
I'm not sure if this is a bug, or a limitation of the arduino platform:
Results in: (as run from a recently tiny-go docker container)
Works fine when called with
-target=qemu
The text was updated successfully, but these errors were encountered: