Project

General

Profile

Bug #322

library should not do exit() for error handling

Added by Yannick Brosseau about 8 years ago. Updated 7 months ago.

Status:
Invalid
Priority:
Low
Category:
-
Target version:
-
Start date:
03/05/2012
Due date:
% Done:

0%

Estimated time:

Description

It's impolite for a library to call exit().

We should find a better way to do error handling in those case

(
rom rpmlint:
libbabeltrace.x86_64: W: shared-lib-calls-exit /usr/lib64/libbabeltrace-ctf.so.0.0.0 exit@GLIBC_2.2.5
)
Its in the file:
babeltrace/formats/ctf/metadata/ctf-lexer.c

#1

Updated by Yannick Brosseau about 8 years ago

From rpmlint:
libbabeltrace.x86_64: W: shared-lib-calls-exit /usr/lib64/libbabeltrace-ctf.so.0.0.0 exit@GLIBC_2.2.5

Its in the file:
babeltrace/formats/ctf/metadata/ctf-lexer.c

#2

Updated by Yannick Brosseau about 8 years ago

  • Description updated (diff)
#3

Updated by Mathieu Desnoyers about 8 years ago

  • Status changed from New to Confirmed

The exit is generated by flex automatically. We can override it by providing our own yy_fatal_error implementation, but it won't allow us to do much better than a kill on self or something like that. Otherwise, we'd have to use setjmp/longjmp, but I'm not sure how portable they are.

#4

Updated by Jonathan Rajotte Julien 7 months ago

  • Status changed from Confirmed to Invalid

State of babeltrace moved a lot since.

Closing this ticket as invalid. Reopen it if it stills apply to Babeltrace 2.

Also available in: Atom PDF