Search completed in 1.61 seconds.
13 results for "Valgrind":
The Valgrind Test Job
MozillaTestingValgrind test job
the valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
... this job only runs on linux64, which is the platform best suited to running valgrind.
... running the valgrind test job locally valgrind works best on linux.
...And 7 more matches
Hacking Tips
MozillaProjectsSpiderMonkeyHacking Tips
break on valgrind errors sometimes, a bug can be reproduced under valgrind but hardly under gdb.
... one way to investigate is to let valgrind start gdb for you, the other way documented here is to let valgrind act as a gdb server which can be manipulated from the gdb remote.
... $ valgrind --smc-check=all-non-file --vex-iropt-register-updates=allregs-at-mem-access --vgdb-error=0 ./js … this command will tell you how to start gdb as a remote.
...And 4 more matches
Performance
MozillaPerformance
valgrind valgrind is a tool that detects various memory-related problems at runtime, including leaks.
... valgrind is used as part of mozilla's continuous integration testing, though the coverage is limited because valgrind is slow.
...lsan) is similar to valgrind, but it runs faster because it uses static source code instrumentation.
... apple tools apple provides some tools for mac os x that report similar problems to those reported by lsan and valgrind.
Testing Mozilla code
MozillaTesting
the first part will focus on the modern and robust way of static-analysis and the second part will present the build-time static-analysis.debugging mozilla with valgrindthis page describes how to use valgrind (specifically, its memcheck tool) to find memory errors.firefox and address sanitizeraddress sanitizer (asan) is a fast memory error detector that detects use-after-free and out-of-bound bugs in c/c++ programs.
...this type of coverage is only concerned with hit counts for lines and branches.the valgrind test jobthe valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
... this job only runs on linux64, which is the platform best suited to running valgrind.
Leak-hunting strategies and tips
MozillaPerformanceLeak-hunting strategies and tips
once you've done this, and it doesn't leak much, then try the action under trace-malloc or lsan or valgrind to find the leaks of smaller graphs of objects.
...(or allocations?) all tier 1 platforms build with --enable-trace-malloc leak tools for simple objects and summary statistics tracemalloc all allocations all tier 1 platforms build with --enable-trace-malloc valgrind all allocations mac, linux build with --enable-valgrind and some other options lsan all allocations mac, linux any build apple tools ?
Secure Development Guidelines
MozillaSecuritySecure Development Guidelines
int argc, char *argv[]) { if (argc > 1) printf(argv[1]); } format string bugs: prevention easy to fix: always use a format string specifier: int main(int argc, char *argv[]) { if (argc > 1) printf("%s", argv[1]); } double free example: void* ptr = malloc(1024); if (error) { free(ptr); } free(ptr); double free: prevention set a pointer to null when it’s freed valgrind or malloc debugging can help detect those bugs use after free accessing data after a free() or delete can lead to undefined behavior some debug tools might be able catch some cases un-initialized data example: int main() { char *uninitialized_ptr; printf("0x%08x\r\n", uninitialized_ptr); return 0; } $ ./test 0x8fe0103 un-initialized data: prevention initialize y...
... memory leaks example: void *p; size_t new_size; p = realloc(p, new_size); if (p == null) { /* handle error */ } memory leaks: prevention tools like valgrind can help detect memory leaks writing secure code: object management reference counting issues real-life example (bug 440230) void addref() { ++mrefcnt; ns_log_addref(this, mrefcnt, "nscssvalue::array", sizeof(*this)); } void release() { --mrefcnt; ns_log_release(this, mrefcnt, "nscssvalue::array"); if (mrefcnt == 0) delete this; } reference counting issues: prevention use the largest data type available on your platform for your reference counter use a hard limit constructor/destructor issues if a constructor fails the destructor never gets called this c...
Continuous Integration
MozillaContinuous integration
hf - static rooting hazard analysis s - static analysis v - valgrind build and test jobs; these jobs create valgrind-compatible builds and run a small set of valgrind tests on them.
Debugging
MozillaDebugging
debugging mozilla with valgrind valgrind is a memory debugger for mac and linux.
NSS_3.12_release_notes.html
MozillaProjectsNSSNSS 3.12 release notes.html
or_with_h1 allocates and leaks sha1cx bug 341122: coverity 633 sftk_destroyslotdata uses slot->slotlock then checks it for null bug 351140: coverity 995, potential crash in ecgroup_fromnameandhex bug 362278: lib/util includes header files from other nss directories bug 228190: remove unnecessary nss_enable_ecc defines from manifest.mn bug 412906: remove sha.c and sha.h from lib/freebl bug 353543: valgrind uninitialized memory read in nsspkiobjectcollection_addinstances bug 377548: nss qa test program certutil's default dsa prime is only 512 bits bug 333405: item cleanup is unused deadcode in secitem_allocitem loser bug 288730: compiler warnings in certutil bug 337251: warning: /* within comment bug 362967: export secmod_deletemoduleex bug 389248: nss build failure when nss_enable_ecc is not define...
SpiderMonkey 1.8.5
MozillaProjectsSpiderMonkeyReleases1.8.5
if you are running valgrind on your embedding, be sure to build spidermonkey with the --enable-valgrind option to suppress superflous error messages triggered by the garbage collector.
SpiderMonkey 1.8.7
MozillaProjectsSpiderMonkeyReleases1.8.7
if you are running valgrind on your embedding, be sure to build spidermonkey with the --enable-valgrind option to suppress superflous error messages triggered by the garbage collector.
Running Automated JavaScript Tests
MozillaProjectsSpiderMonkeyRunning Automated JavaScript Tests
e-level functionality, you may wish to use jstests.py path_to_js_shell --exclude=test262 other options allow you to show the test command lines being run, command output and return codes, run tests named in a given file, exclude tests named in a given file, hide the progress bar, change the timeout, run skipped tests, print output in tinderbox format, run a test in the debugger, or run tests in valgrind.
Exploitable crashes
MozillaSecurityExploitable crashes
the other tool is valgrind.