Skip to content

Commit

Permalink
Fix linkage of libunwind and file descriptor leak
Browse files Browse the repository at this point in the history
Previously, libpulp.so.0 were being linked against libunwind, but no
function of this library is called inside libpulp. This library also
do not have any constructors. Hence, only the tools need to link
against this library.

Also fix a file descriptor leak in the stack check code. Since it is
not used in the package updater, this is not critical.

Signed-off-by: Giuliano Belinassi <[email protected]>
  • Loading branch information
giulianobelinassi committed Jan 25, 2023
1 parent cddabd9 commit fd16e1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ noinst_LTLIBRARIES = libcommon.la
AM_CFLAGS += -I$(abs_top_srcdir)/include

libcommon_la_SOURCES = common.c
libcommon_la_LIBADD = $(LIBUNWIND_LIBS)

1 change: 1 addition & 0 deletions tools/introspection.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,6 +2307,7 @@ library_range_detect(pid_t pid, char *library, uintptr_t *range_start,
WARN("error parsing /proc/%d/maps: %s", pid, strerror(errno));

free(line);
fclose(fp);

if (errno)
return errno;
Expand Down

0 comments on commit fd16e1b

Please sign in to comment.