Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SIGFPE signal is not being handled when running on x86_64 WatchOS 7.0+ Simulators #20632

@dalexsoto

Description

@dalexsoto

Steps to Reproduce

  1. Create a new watchOS project that targets watchOS 7.0+ using Xcode 12.0+ and the x86_64 arch
  2. Make sure you are using a package from xamarin-macios main branch (like xamarin.ios-14.9.0.141.pkg)
  3. Write some code that triggers a SIGFPE signal like

[Test]
public void DivRemByZero () {
try {
BigInteger c, d;
c = BigInteger.DivRem (100, 0, out d);
Assert.Fail ("#1");
} catch (DivideByZeroException) {}
}

  1. App crashes and exception is not caught, observe the following is printed in the system log
(UIKitApplication:com.alexsoto.helloWatch.watchkitapp[43c6][rb-legacy][64174]): 
Service exited due to SIGFPE | sent by exc handler[64174]

helloWatch.zip

Current Behavior

App crashes with

(UIKitApplication:com.alexsoto.helloWatch.watchkitapp[43c6][rb-legacy][64174]):
Service exited due to SIGFPE | sent by exc handler[64174]

Expected Behavior

App does not crash and SIGFPE signal is handled by the mono runtime

On which platforms did you notice this

[ x ] macOS
* watchOS 7.0+ 64 bits simulator

Version Used:

Mono JIT compiler version 6.12.0.93 (2020-02/620cf538206 Tue Aug 25 14:04:52 EDT 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          yes(610)
	Suspend:       hybrid
	GC:            sgen (concurrent by default)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions