James Clampffer created HDFS-11388:
--------------------------------------
Summary: libhdfs++: Add an alternative to assert()
Key: HDFS-11388
URL: https://issues.apache.org/jira/browse/HDFS-11388
Project: Hadoop HDFS
Issue Type: Sub-task
Reporter: James Clampffer
Priority: Minor
There's a few places we use C's assert, in a lot of applications it would be
better to switch to something that doesn't necessarily call abort() right away.
Example would be a large program that uses temp files or is responsible for
freeing shared memory used for IPC. Aborting the process will clean up
resources private to the process but leave other sorts of resources hanging
around. If assert is replaced by a different macro it could throw or signal to
indicate that it's no longer safe to use the library but give the rest of the
application a chance to clean up unrelated resources.
I'd also be nice to have a variant that wasn't compiled out on release builds
for inexpensive checks. There have been issues in the past where even -O2
optimized release builds were able to collapse templates/inline/devirtualize
things such that code that looked like it had been working started acting weird
(was relying on UB) and catching that with existing checks would be valuable.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]