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

Segfault reading #110

Closed
Ingvord opened this issue Nov 18, 2019 · 4 comments · Fixed by #111
Closed

Segfault reading #110

Ingvord opened this issue Nov 18, 2019 · 4 comments · Fixed by #111

Comments

@Ingvord
Copy link
Contributor

Ingvord commented Nov 18, 2019

Hi,

I am experiencing a crash trying to h5lt.readDataset with null values:

Screenshot_20191118_171205

Stacktrace:

PID 16373 received SIGSEGV for address: 0x0
/storage/Projects/hzg.wpn.projects/beamtimedb/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x31d6)[0x7feef01661d6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7feef0bad730]
/lib/x86_64-linux-gnu/libc.so.6(+0x15c181)[0x7feef0b36181]
/storage/Projects/hzg.wpn.projects/beamtimedb/node_modules/hdf5/build/Release/h5lt.node(_ZN8NodeHDF54H5lt12read_datasetERKN2v820FunctionCallbackInfoINS1_5ValueEEE+0xf7b)[0x7feef01a0b9b]
/usr/lib/x86_64-linux-gnu/libnode.so.64(+0x81e87c)[0x7feef3da887c]
/usr/lib/x86_64-linux-gnu/libnode.so.64(+0x81fe56)[0x7feef3da9e56]
[0x3af82295452b]

Is it possible to return undefined in this case? Or maybe throw an exception?

Thanks

@rimmartin
Copy link
Collaborator

Would an exception be preferable?

@Ingvord
Copy link
Contributor Author

Ingvord commented Nov 20, 2019

Would an exception be preferable?

IMO definitely not. I think maybe null value will be more appropriate rather than undefined as this is more compliant with JS spec as this clearly means an absence of the value, see e.g. [1]

@rimmartin
Copy link
Collaborator

You mean the return value as null in the case of a null input? I'll see what v8 gives us; and add a test so it can be checked on travis in the future

@Ingvord
Copy link
Contributor Author

Ingvord commented Nov 20, 2019

You mean the return value as null in the case of a null input?

Yes.

I'll see what v8 gives us; and add a test so it can be checked on travis in the future

Cool. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants