Menu

#71 Result of AC_FUNC_MALLOC is ignored

Next Release
open
nobody
None
1
2016-04-25
2016-04-24
Anonymous
No

The result of the AC_FUNC_MALLOC test is discarded. For a negative result malloc is redefined to rpl_malloc which in turn is not provided by psmisc.

Discussion

  • Craig Small

    Craig Small - 2016-04-25

    It's not, but rpl_malloc is universally ignored from what I see. A better idea might be to just remove the test. However, is there some setup you have that actually requires a replacement malloc?

     
  • Anonymous

    Anonymous - 2016-04-25
    Post awaiting moderation.
  • DarKRaveR

    DarKRaveR - 2016-04-25

    I wanted to add some more info, here'S the output from configure with tests that fail and make the build bail out later on:
    checking for struct user_regs_struct.orig_eax... no
    checking for struct user_regs_struct.eax... no
    checking for struct user_regs_struct.ebx... no
    checking for struct user_regs_struct.ecx... no
    checking for struct user_regs_struct.edx... no
    checking for struct user_regs_struct.orig_rax... no
    checking for struct user_regs_struct.rax... no
    checking for struct user_regs_struct.rdi... no
    checking for struct user_regs_struct.rsi... no
    checking for struct user_regs_struct.rdx... no
    checking for struct pt_regs.orig_gpr3... no
    checking for struct pt_regs.gpr... no
    checking for struct pt_regs.uregs... no
    checking for struct pt_regs.regs... no
    checking for struct pt_regs.cp0_status... no
    checking for struct pt_regs.orig_d0... no
    checking for struct pt_regs.d0... no

    and:

    checking for GNU libc compatible malloc... no
    checking for working memcmp... no
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible realloc... no

    Which will lead to:

    peekfd.c:252:29: error: ‘struct user_regs_struct’ has no member named ‘REG_ORIG_ACCUM’
    (and quite some more)

    and

    killall.c:(.text+0x44): undefined reference to `rpl_malloc' (and dozens more)

    I managed to build psmisc by setting
    ac_cv_func_malloc_0_nonnull=yes
    ac_cv_func_realloc_0_nonnull=yes

    I don't know if this is safe though, and it does not feel like fixing the actual reason.

    And I need to add -DX86_64 to CFLAGS, as a fast nasty workaround for the first problem.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.