qemu-riscv.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
To: Alexander Pinheiro Paschoaletto <alexp@isep.ipp.pt>,
	"qemu-riscv@nongnu.org" <qemu-riscv@nongnu.org>
Subject: Re: Weird behavior on RISC-V code running on QEMU
Date: Wed, 13 Mar 2024 06:24:46 -0300	[thread overview]
Message-ID: <d78fdd0c-1faa-4863-9fbe-a8b9a7226406@ventanamicro.com> (raw)
In-Reply-To: <VI1PR0402MB3613CDF1B2054516974813D6F82B2@VI1PR0402MB3613.eurprd04.prod.outlook.com>

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	other threads:[~2024-03-13  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 22:06 Weird behavior on RISC-V code running on QEMU Alexander Pinheiro Paschoaletto via
2024-03-13  9:24 ` Daniel Henrique Barboza [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d78fdd0c-1faa-4863-9fbe-a8b9a7226406@ventanamicro.com \
    --to=dbarboza@ventanamicro.com \
    --cc=alexp@isep.ipp.pt \
    --cc=qemu-riscv@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).