Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    60655973
    Implement __libc_stack_end · 60655973
    Nadav Har'El authored
    Java doesn't trust pthread_getattr_np() to work for the main thread in
    Linux, so instead it relies on a global variable __libc_stack_end, which
    we didn't implement and therefore causing an annoying message.
    
    This patch implements __libc_stack_end. Pardoxically, this shouldn't point
    to the real stack end (we can easily find this our sched::thread interfaces)
    but a little below it, because Java expects the address to be in the
    stack, not one byte above it. So we use __builtin_frame_address(0) to
    find the current frame's address.
    
    Unfortunately, while this elliminates one warning message, another one
    remains - because Java later expects to read /proc/self/maps and doesn't
    find it.
    60655973
    History
    Implement __libc_stack_end
    Nadav Har'El authored
    Java doesn't trust pthread_getattr_np() to work for the main thread in
    Linux, so instead it relies on a global variable __libc_stack_end, which
    we didn't implement and therefore causing an annoying message.
    
    This patch implements __libc_stack_end. Pardoxically, this shouldn't point
    to the real stack end (we can easily find this our sched::thread interfaces)
    but a little below it, because Java expects the address to be in the
    stack, not one byte above it. So we use __builtin_frame_address(0) to
    find the current frame's address.
    
    Unfortunately, while this elliminates one warning message, another one
    remains - because Java later expects to read /proc/self/maps and doesn't
    find it.
pulseaudio NaN GiB