Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify segfault on aarch64 linux #16

Closed
syoyo opened this issue Jan 10, 2020 · 3 comments
Closed

verify segfault on aarch64 linux #16

syoyo opened this issue Jan 10, 2020 · 3 comments

Comments

@syoyo
Copy link
Contributor

syoyo commented Jan 10, 2020

OS: Ubuntu 18.04.3 Linux
CPU: ARM a72(aarch64)
Build config : Use scripts/bootstrap-aarch64-linux.sh
Branch : master v3.6.1

./verify 
Cylinder test 3 failed: cylinder = Cylinder { p0 = (0, 0, 0), p1 = (1, 0, 0), r = 1}, ray = { 
  org = (0, 0, 0)
  dir = (1, 0, 0)
  near = 0
  far = inf
  time = 0
  mask = -1
  id = 0
  flags = 0
  Ng = (-3.60566e+18, 1.77965e-43, -1.69402e-24)  u = 1.77965e-43
  v = -8.17928e-33
  primID = 85
  geomID = 4294967295
  instID = 0
}, hit = 1, t = [-295.603; 295.603]
Cylinder test 4 failed: cylinder = Cylinder { p0 = (0, 0, 0), p1 = (1, 0, 0), r = 1}, ray = { 
  org = (0, 0, 0)
  dir = (-1, 0, 0)
  near = 0
  far = inf
  time = 0
  mask = -1
  id = 0
  flags = 0
  Ng = (-3.60566e+18, 1.77965e-43, -1.69402e-24)  u = 1.77965e-43
  v = -8.17928e-33
  primID = 85
  geomID = 4294967295
  instID = 0
}, hit = 1, t = [-295.603; 295.603]
verify: /mnt/data/work/embree-aarch64/kernels/common/device.cpp:67: embree::Device::Device(const char*): Assertion `isa::Cylinder::verify()' failed.
Aborted (core dumped)
@syoyo
Copy link
Contributor Author

syoyo commented Jan 11, 2020

The reason was rcp_length(rsqrt) used in Cylinder::verify() does not use correct NEON code path for non-iOS build

https://github.com/lighttransport/embree-aarch64/blob/master/common/math/vec3fa.h#L192

resulting insufficient or incorrect result(e.g. rcp_length(dot((1, 0, 0), (1, 0, 0))) gives slightly less value than 1(0.999994))

@syoyo
Copy link
Contributor Author

syoyo commented Mar 4, 2020

Fixed in neon-fix branch(aarch64-v3.8.0)

@syoyo
Copy link
Contributor Author

syoyo commented Mar 8, 2020

Now fix is included in master 4433618

@syoyo syoyo closed this as completed Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant