libintil_dgettext undefined when building libelf
by Will Newton
Hi,
I'm getting an error when trying to build elfutils caused by an
undefined reference to libintl_dgettext in libelf.
libelf.so is linked with --no-undefined and does not add -lintl to the
linker command line so this seems to be expected behaviour. Is there
any reason why -libintl is not passed?
Thanks,
Please cc any replies, I'm not subscribed.
14 years, 7 months
libebl: Fix allocation of long strings in string table
by Petr Machata
Hi,
for strings of the right size just below the pagesize, not enough memory
was allocated, and malloc internals got corrupted, eventually leading to:
$ ./src/writer ./src/dwarflint
*** glibc detected *** ./src/writer: malloc(): memory corruption:
0x0000000013d3e860 ***
Reproducer (run through valgrind to see the invalid writes):
#include <stdio.h>
#include <string.h>
#include "../elfutils/libebl/libebl.h"
int main (void) {
#define X 4032
char s[X + 1] = {0};
memset (s, '.', X);
struct Ebl_Strtab *t = ebl_strtabinit (false);
ebl_strtabadd (t, s, 0);
}
For long strings, the allocation was inefficient because the length of
string was used directly, instead of rounding it up to the nearest page
size.
Both is now fixed on the pmachata/libebl-long-strings branch. Please
review.
PM
14 years, 7 months