qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behavior on RISC-V code running on QEMU


From: Daniel Henrique Barboza
Subject: Re: Weird behavior on RISC-V code running on QEMU
Date: Wed, 13 Mar 2024 06:24:46 -0300
User-agent: Mozilla Thunderbird

Hi Alexander,

Can you please also file a bug here:

https://gitlab.com/qemu-project/qemu/-/issues/new

We use Gitlab as a bug tracker. The issue will have more visibility there than
in this mailing list.

You did a good job describing the problem in the email already, so you can
simply copy/paste the contents in the new Gitlab issue.


Thanks,

Daniel

On 3/12/24 19:06, Alexander Pinheiro Paschoaletto via wrote:
Hello everyone, hope you are all doing great!

This is my first email within this group and frankly I'm not sure if it's the 
right place to ask for help or report a bug, so please feel free to warn me in 
case I should post this elsewhere. I am currently facing some weird problems on 
a RISC-V project meant to run on the QEMU environment and thought that maybe 
someone here could give me a light on the subject.

I am trying to run a project built on top of one of FreeRTOS' official demo 
ports that target the 'virt' QEMU board. I ran across a few weird behaviors 
where code execution would just hang at some point (QEMU would keep execution 
but the expected terminal output would never come up). I don't have sufficient 
knowledge to tell whether the issue is with the FreeRTOS port, the RISC-V gnu 
toolchain or QEMU itself, hence why I am raising my hand for help on all 
related channels.

This repository 
<https://bitbucket.org/softcps-investigacao-risc-v/freertos-riscv-bugs/src/master/> contains 
more details and a sample project that illustrates well one of the problems I've been getting lately 
(I also give more context about it here 
<https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1434>). It basically goes like 
this: the program *executes fine* when a certain code snippet is encapsulated *within a function*, 
but *"crashes"* (i.e. hangs) when the same snippet is placed *directly in the main code*:



The scope shouldn't matter at all here, since there is no local variable being 
used or anything like that. I have tested things like removing compiling 
optimization (i.e. changing -Os for -O0) and using regular malloc() instead of 
FreeRTOS' dynamic allocation API, but all without success.  Note that even 
though the project is build on top of the FreeRTOS demo port, no RTOS 
functionality is used within this code to make it as simple as it gets.

And that's basically it. If any of you have a wild guess on the likely cause or 
something, please let me know.
Thanks in advance.

Best regards,
Alexander Paschoaletto





reply via email to

[Prev in Thread] Current Thread [Next in Thread]