1.I have added -g in the makefile like this: $(BIN) : $(OBJECTS) $(CC) $(LDFLAGS) -g -o $@ $(OBJECTS) $(LIBS) 2.Then I run memcheck: valgrind --leak-check=full ./sensor_daemon 3.The result obtained does not show the error line number: ==3588== Memcheck, a memory error detector ==3588== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==3588== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==3588== Command: ./sensor_daemon ==3588== Connection established with kernel. resource->hdr_mode:0 HDR_PIPELINE_ADV:2 resource->hdr_expo_num:1, HDR_2X:2 night_mode:0 ---load mliso_adj_param--- !!! [/home2/alwyn/sdk2.6_all_trunk/src/sysapps/vendor/packages/img_mw/mw/arch_s2l/src/mw_image_priv_spot_mode_rc845.c: 673]/etc/idsp/adj_params/imx307_mliso_adj_param_oc845.bin /etc/idsp/adj_params/imx307_aeb_param_oc845.bin >>> pipline:1, hdr_mode:0, expo_num:1, raw_pitch:0 >>> main:size 1920x1088, raw:1920x1088, resolution:10 ==3588== Thread 2: ==3588== Conditional jump or move depends on uninitialised value(s) ==3588== at 0x41C96: ??? (in /usr/local/bin/sensor_daemon) ==3588== ==3588== Conditional jump or move depends on uninitialised value(s) ==3588== at 0x4D5267C: mmap (mmap.S:38) ==3588== by 0x41CA5: ??? (in /usr/local/bin/sensor_daemon) ==3588== ==3588== Syscall param mmap2(length) contains uninitialised byte(s) ==3588== at 0x4D52688: mmap (mmap.S:42) ==3588== by 0x41CA5: ??? (in /usr/local/bin/sensor_daemon) ==3588== ==3588== Syscall param mmap2(offset) contains uninitialised byte(s) ==3588== at 0x4D52688: mmap (mmap.S:42) ==3588== by 0x41CA5: ??? (in /usr/local/bin/sensor_daemon) ==3588== ==3588== Conditional jump or move depends on uninitialised value(s) ==3588== at 0x41D0A: ??? (in /usr/local/bin/sensor_daemon) ==3588== Source and destination overlap in memcpy(0x59b40c0, 0x59b40c0, 20) ==3588== at 0x4843558: memcpy (in /usr/local/lib/valgrind/vgpreload_memcheck-arm-linux.so) ==3588== no translater for filter 10 ==3588== Thread 4: ==3588== Syscall param ioctl(generic) points to uninitialised byte(s) ==3588== at 0x4D4FC36: ioctl (syscall-template.S:81) ==3588== by 0x2782D: ??? (in /usr/local/bin/sensor_daemon) ==3588== Address 0x6eadb54 is on thread 4's stack ==3588== ==3588== Syscall param ioctl(generic) points to uninitialised byte(s) ==3588== at 0x4D4FC36: ioctl (syscall-template.S:81) ==3588== by 0x279B9: ??? (in /usr/local/bin/sensor_daemon) ==3588== Address 0x6eadba0 is on thread 4's stack ........... This is the test result after I cross-compile the code to the arm platform.I want to find the specific location of the error in the code.
Can you try with the latest Valgrind?
Still waiting for info.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!
Reopening bug wrongly closed by KDE janitor.
One last chance. I see you added -g to the link. Did you also do so for the compilation?