From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 2 May 2016 18:36:25 +0200 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: <83332f423f24f1aa53cac38487b96d5d@mule> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] store NaN() to memory traps on 386 (387) Topicbox-Message-UUID: 8e2710b2-ead9-11e9-9d60-3106f5b1d025 my initial analysis was wrong. i got fooled by the asynchronous nature of the exception delivery. the trap already happend on the FLD instruction when we try to load the SNaN from memory. what sucks is that passing "nan" to strtod() will result in a program crash with the default fcr instead of rejecting the string. so everyone is forced to filter the inputs to strtod() to avoid the crash, or change the fcr and then deal with the nan's and infs. -- cinap