How to enable valgrind leak check?

hi guys! could you guide me how to no strip uClibc?

==1104== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==1104== Command: gateway
==1104== valgrind: Unrecognised instruction at address 0x4003da4.
==1104==    at 0x4003DA4: ??? (in /lib/
==1104==    by 0x4003D4C: ??? (in /lib/
==1104== Your program just tried to execute an instruction that Valgrind
==1104== did not recognise.  There are two possible reasons for this.
==1104== 1. Your program has a bug and erroneously jumped to a non-code
==1104==    location.  If you are running Memcheck and you just saw a
==1104==    warning about a bad jump, it's probably your program's fault.
==1104== 2. The instruction is legitimate but Valgrind doesn't handle it,
==1104==    i.e. it's Valgrind's fault.  If you think this is the case or
==1104==    you are not sure, please let us know and we'll try to fix it.
==1104== Either way, Valgrind will now raise a SIGILL signal which will
==1104== probably kill your program.
==1104== Process terminating with default action of signal 4 (SIGILL)
==1104==  Illegal opcode at address 0x4003DA4
==1104==    at 0x4003DA4: ??? (in /lib/
==1104==    by 0x4003D4C: ??? (in /lib/
==1104== HEAP SUMMARY:
==1104==     in use at exit: 0 bytes in 0 blocks
==1104==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==1104== All heap blocks were freed -- no leaks are possible
==1104== For counts of detected and suppressed errors, rerun with: -v
==1104== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
Illegal instruction

because the flash is not large, so i have to use dmalloc in busybox?

For which version of OpenWrt (and which target) are you trying this?
Please note that OpenWrt does not use uClibc anymore for some time already.

im using the 14.07 on mt7688 mips, very old one

Sorry for asking, but I have to know why you want to build 14.07? That is far out of support.

What device are you working with that doesn't support even Lede or 19.07?

because project starts with 14.07

Hi David!

What project are you trying to do? OpenWrt releases are based on the date (YY.MM.xx) that particular release was locked. Building a 14.07 version of OpenWrt, originally locked in July 2014. Not only will you probably run into Build Environment issues (Linux platforms and their packages have changed since 2014), but the packages included in OpenWrt would also be from 2014 (barring any backported security updated for a package, if available and if someone is willing to have done it for so old a release). For example, OpenWrt uses MUSL and has no support for uClibc under 21.02 (and maybe 19.07, I don't remember when the change went into effect)

The 19.07 release was (one of) the last 4MB/32MB RAM/ROM device support versions, which may limit your Version support available for an old(!) router, but should still work. Newer devices may or may not have device support, or at least similar devices you can model after.

If you are looking to build OpenWrt for a non-supported device, You'll need to ask yourself a few questions, such as:

  1. If the device is an old device, and not already supported, I am not sure how much of a chance you'll have of backporting a device to 19.07, even assuming you (or your team) do all the work and testing.

  2. Is it actually WORTH it? I'm all for recycling/upcycling e-waste, but sometimes the target of that passion has to be tempered with reality.

Good luck and Welcome!

Many MT7688 mips devices are supported in 21.02 and 19.07, however I get the impression that you don’t want to share any details of your project.
That’s going to majorly dampen anyones interest in helping out.
Best of luck with your tech archeology project.

1 Like