Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

libinfinipath + dynamic load causes SIGSEGV  #21

@janekmi

Description

@janekmi

If process using libinfinipath aborts (theoretically receives any signal) it will cause SIGSEGV. It is possible to reproduce this issue by loading and unloading libinfinipath with dlopen and dlclose and abort after that.

libinfinipath constructor registers signal handlers which are not probably unregistered properly if library is dynamically loaded / unloaded.

#include <stdlib.h>
#include <assert.h>
#include <dlfcn.h>

#define LIBRARY "libinfinipath.so"

int main(int argc, char *argv[])
{
	void *handle = dlopen(LIBRARY, RTLD_NOW);
	assert(handle != 0);

	dlclose(handle);

	/* Should abort "gracefully" with SIGABRT no with SIGSEGV */
	abort();
	return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions