public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* printf/vsnprintf crashes while printing float values
@ 2021-01-18  9:50 zhongcai.guo
  2021-01-18 14:18 ` Joel Sherrill
  0 siblings, 1 reply; 4+ messages in thread
From: zhongcai.guo @ 2021-01-18  9:50 UTC (permalink / raw)
  To: newlib


Hi,

I run RTEMS system on my Xilinx Zync7000 hardware but printf/vsnprintf crash my system in interrupt. I searched long time in Google, and it seems to be an issue in Newlib than RTEMS(i guess). Therefore i want to figure out whether it
is a fixed issued in Newlib but don't get the place to search closed/fixed bug. So i have no idea but send the email to ask for help. Any hints about the issue would be appreciate.




Best regards
Ceasar Guo
运控部 / MC
Email: zhongcai.guo@qkmtech.com

此电邮可能包含机密信息,如阁下并非本电邮意指的接收方,请及时联系我们并将阁下拥有的本电邮删除。
东莞市李群自动化技术有限公司保留所有权利。
This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message.
QKM Technology (Dongguan) Co., Ltd. Limited. All rights reserved.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: printf/vsnprintf crashes while printing float values
  2021-01-18  9:50 printf/vsnprintf crashes while printing float values zhongcai.guo
@ 2021-01-18 14:18 ` Joel Sherrill
  2021-01-19  1:28   ` zhongcai.guo
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Sherrill @ 2021-01-18 14:18 UTC (permalink / raw)
  To: zhongcai.guo; +Cc: newlib

On Mon, Jan 18, 2021, 3:51 AM zhongcai.guo--- via Newlib <
newlib@sourceware.org> wrote:

>
> Hi,
>
> I run RTEMS system on my Xilinx Zync7000 hardware but printf/vsnprintf
> crash my system in interrupt. I searched long time in Google, and it seems
> to be an issue in Newlib than RTEMS(i guess). Therefore i want to figure
> out whether it
> is a fixed issued in Newlib but don't get the place to search closed/fixed
> bug. So i have no idea but send the email to ask for help. Any hints about
> the issue would be appreciate.
>

Does the thread doing the printing have the floating point attribute?
Otherwise, the flu is disabled

--joel

>
>
>
>
> Best regards
> Ceasar Guo
> 运控部 / MC
> Email: zhongcai.guo@qkmtech.com
>
> 此电邮可能包含机密信息,如阁下并非本电邮意指的接收方,请及时联系我们并将阁下拥有的本电邮删除。
> 东莞市李群自动化技术有限公司保留所有权利。
> This message may contain information that is confidential or privileged.
> If you are not the intended recipient, please advise the sender immediately
> and delete this message.
> QKM Technology (Dongguan) Co., Ltd. Limited. All rights reserved.
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: printf/vsnprintf crashes while printing float values
  2021-01-18 14:18 ` Joel Sherrill
@ 2021-01-19  1:28   ` zhongcai.guo
  2021-01-19  1:55     ` Richard Damon
  0 siblings, 1 reply; 4+ messages in thread
From: zhongcai.guo @ 2021-01-19  1:28 UTC (permalink / raw)
  To: joel; +Cc: newlib

Thanks for your reply.

It crashes in irq handler but not a thread. The irq handler is installed by rtems_interrupt_handler_install(). Can you show me how to set the floating point attrbute?



Best regards
Ceasar Guo
MC
Email: zhongcai.guo@qkmtech.com

This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message.
QKM Technology (Dongguan) Co., Ltd. Limited. All rights reserved.
 
From: Joel Sherrill
Date: 2021-01-18 22:18
To: zhongcai.guo
CC: newlib
Subject: Re: printf/vsnprintf crashes while printing float values


On Mon, Jan 18, 2021, 3:51 AM zhongcai.guo--- via Newlib <newlib@sourceware.org> wrote:

Hi,

I run RTEMS system on my Xilinx Zync7000 hardware but printf/vsnprintf crash my system in interrupt. I searched long time in Google, and it seems to be an issue in Newlib than RTEMS(i guess). Therefore i want to figure out whether it
is a fixed issued in Newlib but don't get the place to search closed/fixed bug. So i have no idea but send the email to ask for help. Any hints about the issue would be appreciate.

Does the thread doing the printing have the floating point attribute? Otherwise, the flu is disabled

--joel




Best regards
Ceasar Guo
运控部 / MC
Email: zhongcai.guo@qkmtech.com

此电邮可能包含机密信息,如阁下并非本电邮意指的接收方,请及时联系我们并将阁下拥有的本电邮删除。
东莞市李群自动化技术有限公司保留所有权利。
This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message.
QKM Technology (Dongguan) Co., Ltd. Limited. All rights reserved.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: printf/vsnprintf crashes while printing float values
  2021-01-19  1:28   ` zhongcai.guo
@ 2021-01-19  1:55     ` Richard Damon
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Damon @ 2021-01-19  1:55 UTC (permalink / raw)
  To: newlib

If you are trying to use printf inside an interrupt handler, that is
likely a problem. That is likely an invalid context to try to use
routines like printf.

On 1/18/21 8:28 PM, zhongcai.guo--- via Newlib wrote:
> Thanks for your reply.
>
> It crashes in irq handler but not a thread. The irq handler is installed by rtems_interrupt_handler_install(). Can you show me how to set the floating point attrbute?
>
>
>
> Best regards
> Ceasar Guo
> MC
> Email: zhongcai.guo@qkmtech.com
>
> This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message.
> QKM Technology (Dongguan) Co., Ltd. Limited. All rights reserved.
>  
> From: Joel Sherrill
> Date: 2021-01-18 22:18
> To: zhongcai.guo
> CC: newlib
> Subject: Re: printf/vsnprintf crashes while printing float values
>
>
> On Mon, Jan 18, 2021, 3:51 AM zhongcai.guo--- via Newlib <newlib@sourceware.org> wrote:
>
> Hi,
>
> I run RTEMS system on my Xilinx Zync7000 hardware but printf/vsnprintf crash my system in interrupt. I searched long time in Google, and it seems to be an issue in Newlib than RTEMS(i guess). Therefore i want to figure out whether it
> is a fixed issued in Newlib but don't get the place to search closed/fixed bug. So i have no idea but send the email to ask for help. Any hints about the issue would be appreciate.
>
> Does the thread doing the printing have the floating point attribute? Otherwise, the flu is disabled
>
> --joel
>
>
>
>
> Best regards
> Ceasar Guo
> 运控部 / MC
> Email: zhongcai.guo@qkmtech.com
>
> 此电邮可能包含机密信息,如阁下并非本电邮意指的接收方,请及时联系我们并将阁下拥有的本电邮删除。
> 东莞市李群自动化技术有限公司保留所有权利。
> This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message.
> QKM Technology (Dongguan) Co., Ltd. Limited. All rights reserved.


-- 
Richard Damon


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-19  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18  9:50 printf/vsnprintf crashes while printing float values zhongcai.guo
2021-01-18 14:18 ` Joel Sherrill
2021-01-19  1:28   ` zhongcai.guo
2021-01-19  1:55     ` Richard Damon

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).