corrode icon indicating copy to clipboard operation
corrode copied to clipboard

Porting libqrencode to Rust

Open Natim opened this issue 8 years ago • 2 comments

Hi, I've see a talk at Fosdem about Corrode and I wanted to give it a try on libqrencode

I tried running:

corrode -DHAVE_CONFIG_H -I. -Wall -g -O2 -pthread qrencode.c

But I've got a strange error

corrode: internal error: runOnce action depends on itself, leading to an infinite loop

I will try to investigate but if you know what it means it would help me.

Thanks

Natim avatar Feb 05 '17 07:02 Natim

Thanks for coming to my talk, and sorry it has taken me a while to get back to you!

That error message means I screwed up a tricky invariant in Corrode. (Before I added the error message, this used to just go into an infinite loop until it ran out of memory, so this error message is hopefully an improvement!) Unfortunately it's difficult to debug this particular problem.

The most useful way to start debugging this is to find a minimal C source file that still makes Corrode output this specific error message. You can automate that process using C-Reduce if you want. Or I'll get around to it eventually; I'm guessing I can probably reproduce the problem if I try it on the same library.

If we can find a minimal source file demonstrating this problem, I can probably tell you pretty quickly what exactly I did wrong!

jameysharp avatar Mar 05 '17 06:03 jameysharp

Ok that's nice, I thought libqrencode was a small library but maybe it is not the case :)

Natim avatar Mar 06 '17 08:03 Natim