I've been using qualtobad successfully if I only use one .or. two named
quality bits. More than that seems to fail.
Here is a test file:
http://www.physics.ubc.ca/~echapin/bla.sdf.gz
This works fine:
qualtobad bla test badbol.or.stat
This gives me a segv:
qualtobad bla test badbol.or.stat.or.apod
Here's some valgrind output:
==30019== Memcheck, a memory error detector.
==30019== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==30019== Using LibVEX rev 1804, a library for dynamic binary translation.
==30019== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30019== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation framework.
==30019== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==30019== For more details, rerun with: -v
==30019==
==30019== Use of uninitialised value of size 8
==30019== at 0x6880D27: irq1_cmqm_ (irq1_cmqm.f:252)
==30019== by 0x6885569: irq_comp_ (irq_comp.f:294)
==30019== by 0x42E377: qualtobad_ (qualtobad.f:162)
==30019== by 0x40D7CF: ndfpack_mon_ (ndfpack_mon.f:305)
==30019== by 0x40CE7E: dtask_applic_ (dtask_applic.f:66)
==30019== by 0x108DD4AF: dtask_obeydcl_ (dts_obeydcl.f:160)
==30019== by 0x108DBC87: dtask_dcltask_ (dts_dcltask.f:153)
==30019== by 0x40CDB0: MAIN_ (dtask_main.f:140)
==30019== by 0x43F60D: main (in /stardev/bin/kappa/ndfpack_mon)
==30019==
==30019== Invalid read of size 4
==30019== at 0x6880D27: irq1_cmqm_ (irq1_cmqm.f:252)
==30019== by 0x6885569: irq_comp_ (irq_comp.f:294)
==30019== by 0x42E377: qualtobad_ (qualtobad.f:162)
==30019== by 0x40D7CF: ndfpack_mon_ (ndfpack_mon.f:305)
==30019== by 0x40CE7E: dtask_applic_ (dtask_applic.f:66)
==30019== by 0x108DD4AF: dtask_obeydcl_ (dts_obeydcl.f:160)
==30019== by 0x108DBC87: dtask_dcltask_ (dts_dcltask.f:153)
==30019== by 0x40CDB0: MAIN_ (dtask_main.f:140)
==30019== by 0x43F60D: main (in /stardev/bin/kappa/ndfpack_mon)
==30019== Address 0x80f04d764 is not stack'd, malloc'd or (recently) free'd
==30031==
==30031== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 7 from 1)
==30031== malloc/free: in use at exit: 384,684 bytes in 1,280 blocks.
==30031== malloc/free: 80,217 allocs, 78,937 frees, 4,686,689 bytes allocated.
==30031== For counts of detected errors, rerun with: -v
==30031== searching for pointers to 1,280 not-freed blocks.
==30031== checked 49,470,752 bytes.
==30031==
==30031== LEAK SUMMARY:
==30031== definitely lost: 0 bytes in 0 blocks.
==30031== possibly lost: 175,490 bytes in 1,224 blocks.
==30031== still reachable: 209,194 bytes in 56 blocks.
==30031== suppressed: 0 bytes in 0 blocks.
==30031== Rerun with --leak-check=full to see details of leaked memory.
==30019==
==30019== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 7 from 1)
==30019== malloc/free: in use at exit: 452,678 bytes in 1,374 blocks.
==30019== malloc/free: 80,217 allocs, 78,843 frees, 4,686,689 bytes allocated.
==30019== For counts of detected errors, rerun with: -v
==30019== searching for pointers to 1,374 not-freed blocks.
==30019== checked 49,532,072 bytes.
==30019==
==30019== LEAK SUMMARY:
==30019== definitely lost: 0 bytes in 0 blocks.
==30019== possibly lost: 175,490 bytes in 1,224 blocks.
==30019== still reachable: 277,188 bytes in 150 blocks.
==30019== suppressed: 0 bytes in 0 blocks.
==30019== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault
I'm running 64bit Ubuntu 8.04, and my build is a couple of weeks old (I've
actually been git pull'ing regularly, I just don't usually rebuild all of
the libraries etc. whenever there is a change as I'm working on SMURF
until something actually breaks...)
Ed
+----------------------------------------------------------------+
| Dr. Edward Chapin (604) 822-6709 (work) |
| Dept. of Physics and Astronomy |
| University of British Columbia |
| 6224 Agricultural Road, Vancouver, B.C. |
| V6T 1Z1, Canada [log in to unmask] |
+----------------------------------------------------------------+
|