Skip to content

sim: fix vfork report error#8497

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
GUIDINGLI:mine7
Feb 11, 2023
Merged

sim: fix vfork report error#8497
xiaoxiang781216 merged 1 commit into
apache:masterfrom
GUIDINGLI:mine7

Conversation

@GUIDINGLI
Copy link
Copy Markdown
Contributor

@GUIDINGLI GUIDINGLI commented Feb 10, 2023

Summary

sim: fix vofrk report error

user_main: vfork() test
================================================================= ==3754757==ERROR: AddressSanitizer: stack-buffer-underflow on address 0xae9126f0 at pc 0x56845661 bp 0xae912570 sp 0xae912560 READ of size 1 at 0xae9126f0 thread T0
    #0 0x56845660 in memcpy string/lib_memcpy.c:44
    #1 0x56b70f61 in up_vfork sim/sim_vfork.c:133
    #2 0x567c0b85 in vfork (/home/ligd/platform/sim/nuttx/nuttx+0x26bb85)

0xae9126f0 is located 73456 bytes inside of 73728-byte region [0xae900800,0xae912800) allocated by thread T0 here:
    #0 0xf7ab1c2f in __interceptor_posix_memalign ../../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:226

SUMMARY: AddressSanitizer: stack-buffer-underflow string/lib_memcpy.c:44 in memcpy

Impact

sim vfork

Testing

ostest

Comment thread arch/sim/src/sim/sim_vfork.c
@acassis
Copy link
Copy Markdown
Contributor

acassis commented Feb 10, 2023

Please fix the typo: vofrk -> vfork

user_main: vfork() test
=================================================================
==3754757==ERROR: AddressSanitizer: stack-buffer-underflow on address 0xae9126f0 at pc 0x56845661 bp 0xae912570 sp 0xae912560
READ of size 1 at 0xae9126f0 thread T0
    #0 0x56845660 in memcpy string/lib_memcpy.c:44
    #1 0x56b70f61 in up_vfork sim/sim_vfork.c:133
    #2 0x567c0b85 in vfork (/home/ligd/platform/sim/nuttx/nuttx+0x26bb85)

0xae9126f0 is located 73456 bytes inside of 73728-byte region [0xae900800,0xae912800)
allocated by thread T0 here:
    #0 0xf7ab1c2f in __interceptor_posix_memalign ../../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:226

SUMMARY: AddressSanitizer: stack-buffer-underflow string/lib_memcpy.c:44 in memcpy

Signed-off-by: ligd <liguiding1@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 changed the title sim: fix vofrk report error sim: fix vfork report error Feb 11, 2023
@xiaoxiang781216 xiaoxiang781216 merged commit 7e3e99c into apache:master Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants