This works fine for me (see output excerpt below)...
This might be an issue with your toolchain, try to upgrade clang/gcc.
bganne@vm:~/src/vpp$ ASAN_OPTIONS=handle_segv=2 make run
WARNING: STARTUP_CONF not defined or file doesn't exist.
Running with minimal startup config: unix { interactive cli-listen
/run/vpp/cli.sock gid 1001 } dpdk { no-pci } \n
clib_sysfs_prealloc_hugepages:262: pre-allocating 19 additional 2048K hugepages
on numa node 0
perfmon [warn ]: skipping source 'intel-uncore' -
intel_uncore_init: no uncore units found
=================================================================
==1847==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020003d43fc
at pc 0x7f6344ddc07f bp 0x7f6341dd48d0 sp 0x7f6341dd48c8
WRITE of size 4 at 0x6020003d43fc thread T0
#0 0x7f6344ddc07e in dpdk_config
/home/bganne/src/vpp/src/plugins/dpdk/device/init.c:995:11
#1 0x7f638933f0f2 in vlib_call_all_config_functions
/home/bganne/src/vpp/src/vlib/init.c:476:15
#2 0x7f638937f4f5 in vlib_main /home/bganne/src/vpp/src/vlib/main.c:1973:16
#3 0x7f638946b803 in thread0 /home/bganne/src/vpp/src/vlib/unix/main.c:669:7
#4 0x7f63890596cf in clib_calljmp
/home/bganne/src/vpp/src/vppinfra/longjmp.S:123
0x6020003d43fc is located 34 bytes to the right of 10-byte region
[0x6020003d43d0,0x6020003d43da)
allocated by thread T0 here:
#0 0x5557d184d79e in __interceptor_malloc
(/home/bganne/src/vpp/build-root/install-vpp_debug-native/vpp/bin/vpp+0xb979e)
(BuildId: f803464de67fdbe3b4de9189c6d10e1766d032d1)
#1 0x7f6344ddc024 in dpdk_config
/home/bganne/src/vpp/src/plugins/dpdk/device/init.c:994:14
#2 0x7f638933f0f2 in vlib_call_all_config_functions
/home/bganne/src/vpp/src/vlib/init.c:476:15
#3 0x7f638937f4f5 in vlib_main /home/bganne/src/vpp/src/vlib/main.c:1973:16
#4 0x7f638946b803 in thread0 /home/bganne/src/vpp/src/vlib/unix/main.c:669:7
#5 0x7f63890596cf in clib_calljmp
/home/bganne/src/vpp/src/vppinfra/longjmp.S:123
SUMMARY: AddressSanitizer: heap-buffer-overflow
/home/bganne/src/vpp/src/plugins/dpdk/device/init.c:995:11 in dpdk_config
Shadow bytes around the buggy address:
0x0c0480072820: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c0480072830: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c0480072840: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c0480072850: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c0480072860: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
=>0x0c0480072870: fa fa 00 00 fa fa 00 00 fa fa 00 02 fa fa fa[fa]
0x0c0480072880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0480072890: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c04800728a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c04800728b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c04800728c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==1847==ABORTING
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer: nested bug in the same thread, aborting.
make: *** [Makefile:575: run] Error 1
Best,
ben
> -----Original Message-----
> From: [email protected] <[email protected]> On Behalf Of mercury noah
> Sent: Friday, June 24, 2022 9:59
> To: [email protected]
> Subject: [vpp-dev] Unable to show all asan information to run vpp with
> asan enabled #vpp
>
> When I run vpp with asan enabled and test heap overflow access, I found
> that vpp do not show all asan information,
>
>
> The modified code is something like this,
>
>
> The output of gdb bt is like below,
>
>
> I tried to run vpp with ASAN_OPTIONS=handle_segv=2 ,it show below
> information,
> seems like When asan is reporting error, there is another error occured,
>
> root@debian:/opt/vpp_base# ASAN_OPTIONS=handle_segv=2 make run
> WARNING: STARTUP_CONF not defined or file doesn't exist.
> Running with minimal startup config: unix { interactive cli-
> listen /run/vpp/cli.sock gid 0 } dpdk { no-pci } \n
> =================================================================
> AddressSanitizer:DEADLYSIGNAL
> AddressSanitizer: nested bug in the same thread, aborting.
> make: *** [Makefile:575: run] Error 1
>
> vpp version is v22.10-rc0~33-gd6c3b1f1f,
>
> DBGvpp# show version
> vpp v22.10-rc0~33-gd6c3b1f1f built by root on debian at 2022-06-
> 24T07:01:11
>
> Linux release is debian 11,
>
> root@debian:/opt/vpp_base# uname -a
> Linux debian 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64
> GNU/Linux
>
> Maybe there is a missuse of this feature, but I can't verify it,
> anyone may help me to solve this issue,
>
> Thanks,
> Mercury
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21581): https://lists.fd.io/g/vpp-dev/message/21581
Mute This Topic: https://lists.fd.io/mt/91960513/21656
Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-