Page MenuHomePhabricator

ecore: Fix Asan stack overflow warning

Authored by smohanty on Jun 2 2020, 7:09 PM.



As argument can be passed by register (depending on the compiler optimization)
when we take the adress of the nbytes and pass it to send() function which reades
4 bytes from it ASAN flags it as a stack overflow . So just assign the value to a
local variable to avoid the warning.

Diff Detail

rEFL core/efl
No Linters Available
No Unit Test Coverage
Build Status
Buildable 16897
Build 11231: arc lint + arc unit
smohanty created this revision.Jun 2 2020, 7:09 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

smohanty requested review of this revision.Jun 2 2020, 7:09 PM


==15387==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f1b3e76092c at pc 0x7f1b4bc1c93e bp 0x7f1b3e760900 sp 0x7f1b3e7600a8
READ of size 4 at 0x7f1b3e76092c thread T1
#0 0x7f1b4bc1c93d  (/usr/lib/x86_64-linux-gnu/
#1 0x7f1b4b3437a5 in ecore_pipe_write ../src/lib/ecore/ecore_pipe.c:220
#2 0x7f1b4b298297 in _ecore_main_loop_thread_safe_call ../src/lib/ecore/ecore.c:1019
#3 0x7f1b4b34f67b in _ecore_short_job ../src/lib/ecore/ecore_thread.c:389
#4 0x7f1b4b34fc3c in _ecore_thread_worker ../src/lib/ecore/ecore_thread.c:509
#5 0x7f1b4b6a25da in _eina_internal_call ../src/lib/eina/eina_thread.c:193
#6 0x7f1b4abb66da in start_thread (/lib/x86_64-linux-gnu/
#7 0x7f1b4a8df88e in __clone (/lib/x86_64-linux-gnu/
Hermet accepted this revision.Jun 2 2020, 7:13 PM
This revision is now accepted and ready to land.Jun 2 2020, 7:13 PM
Hermet closed this revision.Jun 2 2020, 7:17 PM