From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by sourceware.org (Postfix) with ESMTPS id 0C89D3857C6D for ; Tue, 19 Jan 2021 01:56:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0C89D3857C6D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=Damon-Family.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=Richard@Damon-Family.org Received: from [192.168.77.198] ([108.20.19.251]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPA (Nemesis) id 0LfCzm-1lqM440SHg-00opft for ; Tue, 19 Jan 2021 02:56:14 +0100 Subject: Re: printf/vsnprintf crashes while printing float values To: newlib@sourceware.org References: <202101181750544093859@qkmtech.com> <2021011909282122070619@qkmtech.com> From: Richard Damon Message-ID: <881a4bd5-834c-65b5-56e5-68c38e526213@Damon-Family.org> Date: Mon, 18 Jan 2021 20:55:59 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <2021011909282122070619@qkmtech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Provags-ID: V03:K1:9FkBPX623tFlHumWN3vIRIbVdJgOyAVwMTt2QlVUxiyO5Q7D271 DEc6awcuNyGFOATYh26UU1YVvFbLMCjystZNIrgPWoso5SYT9LqJZg7LUB+UOVYKoi6frfx WmVPX4gRjj78dMAI0jelw3G9UnmjSBX6s5CMueCb93HLreXEhZVWzj8TTUmaWuuPkJqKGRV e2Hjd/5mk7RCRrZYBtHLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:kqswhr6ofH8=:KY1ecY8/xFkbW1pCC86Td5 7JhR6Ao+7aCt+5ycyGu63OULr7EWWGY/yQWCBmx3IEUIp+MsYXAq3HhcRNVRfu8TpYBGdPOGT lRQZEVGXRN2eCupIwWkFsdZF5IfBgCQpr6nvI7wuexkxAxiVQzhgJTCuohbo7xpR5nW8WsLkA kIdzPEGbND+kax7j0TlbpU5tmVNH1hv5M8pYqGvdJR12augyGhJqnS7irV6MNTQznLbQ3hD5L wG2RFi0Z8W2/JZXOosjPmPczK6znlFRAfWztCN2/IF6/FkvEpgIyxI7f03lHrdelCZ94CCIAH W6gJ3uBliR7OvSRERyFE6cGAbAdkbBeLloTn9ZYWNoKUmck/aiPokOc89RR7o3ZzGdYJSNPwk vJdMpCghi1B2iIzXj5Xbi+OdSdj6xxGPGHxlWtQu1tABM+6/cIMgqchWcfZ9EZahX1l6gwT9T QpRwohaGpw== X-Spam-Status: No, score=3.2 required=5.0 tests=BAYES_50, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 01:56:16 -0000 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 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