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

Debian Lintian: libafflib0v5: exit-in-shared-library usr/lib/x86_64-linux-gnu/libafflib.so.0.0.0 #48

Open
eribertomota opened this issue Aug 27, 2021 · 5 comments

Comments

@eribertomota
Copy link

I did a little comment about it in #47. How to reproduce:

  1. Make a jail Sid in Debian. Instructions here.
  2. Inside of the jail, install lintian:
    # apt install lintian
  3. Create /root/.lintianrc with the following content:
display-info = yes
pedantic = yes
display-experimental = yes
color = auto
  1. Install some extra packages:
    apt install debhelper devscripts quilt
  2. Download the source and build it:
mkdir afflib
cd afflib
apt source afflib
apt build-dep afflib
cd afflib-<version>
debuild
lintian -i
  1. To clean after a debuild, run debclean.

Thanks!

@sshock
Copy link
Owner

sshock commented Aug 28, 2021

Thanks for writing this up with all those instructions.

@eribertomota
Copy link
Author

eribertomota commented Aug 31, 2021 via email

@eribertomota
Copy link
Author

I sent #50. However, note that the lintian says: "This tag is experimental. Please file a bug report if the tag seems wrong.".

@kwizart
Copy link

kwizart commented Jan 29, 2024

There is a similar error with current rpmlint:

"This library package calls exit() or _exit(), probably in a non-fork() context. Doing so from a library is strongly discouraged - when a library function calls exit(), it prevents the calling program from handling the error, reporting it to the user, closing files properly, and cleaning up any state that the program has. It is preferred for the library to return an actual error code and let the calling program decide how to handle the situation."

@kwizart
Copy link

kwizart commented Jan 29, 2024

I saw few occurrences, but I haven't checked if some cases could be critical and describe the above situation.

lib/afflib_pages.cpp:		exit(-1);		// this shouldn't happen
lib/afflib_util.cpp:  exit(eval);
lib/afflib_util.cpp:  exit(eval);
lib/afflib_util.cpp:  exit(eval);
lib/aftest.cpp:	    exit(1);
lib/aftest.cpp:	    exit(1);
lib/aftest.cpp:	    exit(1);
lib/aftest.cpp:	    exit(1);
lib/aftest.cpp:	    exit(1);
lib/aftest.cpp:    exit(0);
lib/aftest.cpp:	    exit(0);
lib/aftest.cpp:	    exit(0);
lib/aftest.cpp:    exit(0);
lib/aftest.cpp:    exit(0);
lib/aftest.cpp:    exit(0);
lib/aftest.cpp:    exit(0);
lib/aftest.cpp:	case 'S': split_raw_test(optarg);exit(0);
lib/qemu/block-raw-posix.c:    //        /* XXX: aio thread exit seems to hang on RedHat 9 and this init
lib/qemu/block-vvfat.c:    exit(-5);
lib/qemu/qemu-img.c:    exit(1);
lib/qemu/qemu-img.c:    exit(1);
lib/qemu/qemu-img.c:static void term_exit(void)
lib/qemu/qemu-img.c:    atexit(term_exit);
lib/qemu/qemu-img.c:    term_exit();
lib/s3.cpp:    exit(0);
lib/s3.cpp:    exit(0);
lib/s3.cpp:    exit(0);
lib/s3.cpp:    exit(0);
lib/s3.cpp:    exit(0);
lib/s3.cpp:    printf("   -v  print version number and exit\n");
lib/s3.cpp:    exit(0);
lib/s3.cpp:    exit(0);
lib/s3.cpp:	if(opt_make) exit(0);		// file made
lib/s3.cpp:    exit(0);
lib/s3.cpp:	    exit(0);
lib/s3.cpp:	err_set_exit(s3_audit);
lib/s3.cpp:	exit(1);
lib/s3.cpp:	s3_ls(stdout,prefix,0);exit(0);
lib/s3.cpp:    if(!strcmp(cmd,"df")) {s3_df();exit(0);}
lib/s3.cpp:    if(!strcmp(cmd,"cat")) {s3_cat(argc,argv);exit(0);}
lib/s3.cpp:    if(!strcmp(cmd,"rm")) {s3_rm(argc,argv);exit(0);}
lib/s3.cpp:	if ( argc != 3 ) {usage();exit(1);}
lib/s3.cpp:	s3_cp(argc,argv);exit(0);
lib/s3.cpp:    if(!strcmp(cmd,"mkdir")) {s3_mkdir(argc,argv);exit(0);}
lib/s3.cpp:    if(!strcmp(cmd,"rmdir")) {s3_rmdir(argc,argv);exit(0);}
lib/s3.cpp:    if(!strcmp(cmd,"regress")) {regress();exit(0);}
lib/s3.cpp:    if(!strcmp(cmd,"delp")) {s3_delp(argc,argv);exit(0);}
lib/s3.cpp:	s3_bandwidth(argc,argv);exit(0);
lib/s3.cpp:    exit(0);
lib/s3.cpp:    exit(0);

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

3 participants