Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2022 14:13:46 +0200
From:      Paul Floyd <paulf2718@gmail.com>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: AMD64 14.0-CURRENT memory layout changes
Message-ID:  <259246b0-9592-3aa8-2a1a-52609ac5357c@gmail.com>
In-Reply-To: <578a011d-0c3f-3f91-48ca-17999a6515a9@gmail.com>
References:  <bcfa260b-7a94-1414-a5ae-c281e96c76ec@gmail.com> <Y0wiCAlHIHe9rFQ7@nuc> <578a011d-0c3f-3f91-48ca-17999a6515a9@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> 
> How is 14.0 working out what address to use for the stack?
> (The above is with ASLR all off)


Answering my own question:

it's in auxv (from __thr_get_main_stack_base)


/usr/include/sys/elf_common.h:#define   AT_USRSTACKBASE 35      /* Top 
of user stack */

I haven't yet added this (or AT_USRSTACKLIM) to the client auxv that 
Valgrind synthesizes.


I'm still not certain that will fix it - I would have expected 
__thr_get_main_stack_base to fallback to using sysctl.

A+
Paul



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?259246b0-9592-3aa8-2a1a-52609ac5357c>