AFFLIBv3 icon indicating copy to clipboard operation
AFFLIBv3 copied to clipboard

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

Open eribertomota opened this issue 4 years ago • 5 comments
trafficstars

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!

eribertomota avatar Aug 27 '21 15:08 eribertomota

Thanks for writing this up with all those instructions.

sshock avatar Aug 28 '21 01:08 sshock

Em sex., 27 de ago. de 2021 às 22:50, Phillip Hellewell @.***> escreveu:

I'm getting this error when I try to run apt source afflib:

@.***:~/afflib# apt source afflib Reading package lists... Done E: You must put some 'deb-src' URIs in your sources.list

I modified /etc/apt/source.list and added this line, but I'm still getting the error.

deb-src http://deb.debian.org/debian sid main

Sorry for my delay. I didn't find this message in GitHub. Do you have problems yet?

Ah, you need to have two lines:

deb http://deb.debian.org/debian sid main deb-src http://deb.debian.org/debian sid main

eribertomota avatar Aug 31 '21 19:08 eribertomota

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

eribertomota avatar Sep 01 '21 20:09 eribertomota

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 avatar Jan 29 '24 19:01 kwizart

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);

kwizart avatar Jan 29 '24 19:01 kwizart