GithubHelp home page GithubHelp logo

Run Valgrind about vetr HOT 3 CLOSED

brodieG avatar brodieG commented on June 1, 2024
Run Valgrind

from vetr.

Comments (3)

brodieG avatar brodieG commented on June 1, 2024

Another:

> unitize_dir()

11/12 validate.args.R: fun5(1:2, NULL)                                          
 *** caught segfault ***
address 0xb, cause 'memory not mapped'

Traceback:
 1: `slot<-`(.Object, slotName, check = FALSE, slotVal)
 2: initialize(value, ...)
 3: initialize(value, ...)
 4: new("unitizerItemTestError", .new = item.new.dat, .ref = item.ref.dat)
 5: testItem(e1, e2)
 6: testItem(e1, e2)
 7: e1 + item
 8: e1 + item
 9: unitizer + tests
10: unitizer + tests
11: unitize_eval(tests.parsed = tests.parsed[valid], unitizers = unitizers[valid],     global = global)
12: unitize_core(test.files = test.files, store.ids = store.ids,     state = state, pre = pre, post = post, history = history,     interactive.mode = interactive.mode, force.update = force.update,     auto.accept = auto.accept, mode = "unitize")
13: unitize_dir()

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 2
Save workspace image? [y/n/c]: n

from vetr.

brodieG avatar brodieG commented on June 1, 2024

See also https://github.com/joshuaulrich/rchk-docker

from vetr.

brodieG avatar brodieG commented on June 1, 2024

We're going to close this issue for now even though we're not getting perfectly clean valgrind runs. With R -d 'valgrind --dsymutil=yes --tool=memcheck', we're seeing with:

  vet(
    !anyNA(.),
    c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, 24624624,
      2452345234, 2345234524, 23452452, 2243524352, 254254234, 2452452435, NA)
  )
==45756== Invalid read of size 16
==45756==    at 0x1017D7625: _platform_memchr$VARIANT$Base (in /usr/lib/system/libsystem_platform.dylib)
==45756==    by 0x111B1A78F: CSR_strmcpy (in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/vetr/libs/vetr.so)
==45756==    by 0x111B234C6: VALC_process_error (in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/vetr/libs/vetr.so)
==45756==    by 0x111B237B7: VALC_validate (in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/vetr/libs/vetr.so)
==45756==    by 0x10011ADD4: R_doDotCall (dotcode.c:0)
==45756==    by 0x10011C6B2: do_dotcall (dotcode.c:1252)
==45756==    by 0x10014AB3C: Rf_eval (eval.c:728)
==45756==    by 0x10015AE51: R_execClosure (eval.c:1607)
==45756==    by 0x10014A9E9: Rf_eval (eval.c:747)
==45756==    by 0x10018AF47: Rf_ReplIteration (main.c:258)
==45756==    by 0x10018C43E: run_Rmainloop (main.c:308)
==45756==    by 0x100000F5A: main (in /Library/Frameworks/R.framework/Resources/bin/exec/R)
==45756==  Address 0x1030d5150 is 8 bytes after a block of size 232 alloc'd
==45756==    at 0x100094671: malloc (in /usr/local/Cellar/valgrind/HEAD-16457/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==45756==    by 0x10019556D: Rf_allocVector3 (memory.c:2672)
==45756==    by 0x100142BC3: Rf_mkCharLenCE (envir.c:3884)
==45756==    by 0x100184AC1: Rf_mkString (Rinlinedfuns.h:697)
==45756==    by 0x111B1BE8D: VALC_evaluate_recurse (in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/vetr/libs/vetr.so)
==45756==    by 0x111B1C066: VALC_evaluate (in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/vetr/libs/vetr.so)
==45756==    by 0x111B23695: VALC_validate (in /Library/Frameworks/R.framework/Versions/3.4/Resources/library/vetr/libs/vetr.so)
==45756==    by 0x10011ADD4: R_doDotCall (dotcode.c:0)
==45756==    by 0x10011C6B2: do_dotcall (dotcode.c:1252)
==45756==    by 0x10014AB3C: Rf_eval (eval.c:728)
==45756==    by 0x10015AE51: R_execClosure (eval.c:1607)
==45756==    by 0x10014A9E9: Rf_eval (eval.c:747)
==45756== 

The best conclusion I could come up with on debugging is that the error is actually coming from CSR_strmlen_x, and in particular, from the use of memchr therein, where memchr is reading memory in blocks and as such overshoots the '\0'. Note the _platform_memchr$VARIANT$Base.

from vetr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.