Comments (5)
I've now also run it through valgrind, and it is reporting some problems with the write to ww2
by the vst
function (and the subsequent read by the vvp
function).
Valgrind output is below (note that the source line numbers are slightly off because I've added some debug printing to this version of the code).
==58456== Invalid write of size 8
==58456== at 0x43C529: vst (vsubs.c:27)
==58456== by 0x40A56A: initvmix (qpGraph.c:2165)
==58456== by 0x404F50: main (qpGraph.c:812)
==58456== Address 0x3d525908 is 0 bytes after a block of size 104 alloc'd
==58456== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==58456== by 0x40A0DC: initvmix (qpGraph.c:2104)
==58456== by 0x404F50: main (qpGraph.c:812)
==58456==
==58456== Invalid read of size 8
==58456== at 0x43C622: vvp (vsubs.c:43)
==58456== by 0x40A581: initvmix (qpGraph.c:2166)
==58456== by 0x404F50: main (qpGraph.c:812)
==58456== Address 0x3d525908 is 0 bytes after a block of size 104 alloc'd
==58456== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==58456== by 0x40A0DC: initvmix (qpGraph.c:2104)
==58456== by 0x404F50: main (qpGraph.c:812)
==58456==
--58456-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
--58456-- si_code=80; Faulting address: 0x0; sp: 0x402bdae00
In my modified code, qpGraph.c:2166 is: vst(ww2, wwinit, 0.5, nwts) ;
and qpGraph.c:2167 is vvp(ww, ww, ww2, nwts) ;
from admixtools.
With our data, nwts = 18
and nvar = 13
, so when vst(ww2, wwinit, 0.5, nwts)
loops over ww2
to update it, there is a buffer overrun because nwts
is greater than the size of the ww2
vector.
from admixtools.
from admixtools.
@bumblenick I am sure that will fix the problem, as it would necessarily make nvar
at least as large as nwts
, a more explicit version of which is the fix I already tried and can confirm is working (see PR #18).
from admixtools.
from admixtools.
Related Issues (20)
- Warning while using mergeit
- examples/qpWave.log is missing HOT 1
- Convertf error "fatalx: no valid samples!" HOT 1
- Using f3 to test gene flow from ghost species HOT 3
- Negative outgroup f3 statistics
- zsh: segmentation fault (core dumped) HOT 1
- qpadm with single sample - is it possible to run? HOT 2
- Issue with directories with spaces during install
- qpF4Ration
- warning: bad chrom HOT 2
- Compilation issues on the latest macOS Monterey (M1 Mac) HOT 1
- qpAdm: command not found
- qpWave - Segmentation fault (core dumped) HOT 9
- qpDstat Segmentation fault (core dumped)
- What‘s mean the "best" in the result from the qpDstat?
- something about qpGraph
- qpAdm - "pop: ??? has sample size 1 and inbreed set" error message HOT 2
- Not enough RAM for qpfstats? HOT 1
- only 71 lines and truncated
- Nothing happens when using convertf for PACKEDPED to PACKEDANCESTRYMAP HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from admixtools.