than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.
+290061 pie elf always loaded at 0x108000
396415 Valgrind is not looking up $ORIGIN rpath of shebang programs
420682 io_pgetevents is not supported
469782 Valgrind does not support zstd-compressed debug sections
required. mapelf() returns the address just beyond the end of
the furthest-along mapping it creates. The executable is mapped
starting at EBASE, which is usually read from it (eg, 0x8048000
- etc) except if it's a PIE, in which case I'm not sure what
- happens.
+ etc) except if it's a PIE, in which case aspacem is queried for
+ the first adequately sized segement.
The returned address is recorded in info->brkbase as the start
point of the brk (data) segment, as it is traditional to place
return VKI_ENOEXEC;
/* The kernel maps position-independent executables at TASK_SIZE*2/3;
- duplicate this behavior as close as we can. */
+ for us it's good enough to just load it somewhere with enough free space. */
if (e->e.e_type == ET_DYN && ebase == 0) {
- ebase = VG_PGROUNDDN(info->exe_base
- + (info->exe_end - info->exe_base) * 2 / 3);
/* We really don't want to load PIEs at zero or too close. It
works, but it's unrobust (NULL pointer reads and writes
become legit, which is really bad) and causes problems for
/* Later .. on mips64 we can't use 0x108000, because mapelf will
fail. */
# if defined(VGP_mips64_linux)
+ ebase = VG_PGROUNDDN(info->exe_base
+ + (info->exe_end - info->exe_base) * 2 / 3);
if (ebase < 0x100000)
ebase = 0x100000;
# else
- vg_assert(VKI_PAGE_SIZE >= 4096); /* stay sane */
- ESZ(Addr) hacky_load_address = 0x100000 + 8 * VKI_PAGE_SIZE;
- if (ebase < hacky_load_address)
- ebase = hacky_load_address;
+ Bool ok = False;
+ ebase = VG_(am_get_advisory_client_simple)( 0, e->p->p_filesz, &ok );
+
+ if (!ok) {
+ VG_(printf)( "Cannot find segment large enough to contain %llx bytes\n", (ULong)e->p->p_filesz );
+ return VKI_ENOMEM;
+ }
+
# endif
# if defined(VGO_solaris)
bitfield1.stderr.exp bitfield1.vgtest \
bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
bug234814.vgtest bug234814.stderr.exp bug234814.stdout.exp \
+ bug290061.vgtest bug290061.stderr.exp \
bug491394.vgtest bug491394.stderr.exp \
bug492678.vgtest bug492678.stderr.exp \
closeall.stderr.exp closeall.vgtest \
args \
async-sigs \
bitfield1 \
- bug129866 bug234814 bug492678\
+ bug129866 bug234814 \
+ bug290061 \
+ bug492678 \
closeall coolo_strlen \
discard exec-sigmask execve faultstatus fcntl_setown \
fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
# Extra stuff for C tests
ansi_CFLAGS = $(AM_CFLAGS) -ansi
+bug290061_CFLAGS = ${AM_CFLAGS} -pie
bug491394_LDADD = -lc
bug491394_LDFLAGS = -nostdlib -static
bug491394_CFLAGS = ${AM_CFLAGS} -Os