[Cs-dev] Added test for line numbers that fails
Date | 2014-08-03 15:23 |
From | Andres Cabrera |
Subject | [Cs-dev] Added test for line numbers that fails |
Attachments | None None |
Hi, I've added a test for the parsing of orchestra line numbers into the TREE structure, and it is failing. It seems to me that after the first run, the line numbers are wrong. This is code completely alien to me, so I'd appreciate a look (this is causing some of my debugger tests to fail as they rely on line numbers...).Andrés |
Date | 2014-08-03 19:19 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None |
Date | 2014-08-03 19:41 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None None |
Then why do the tests pass with 0? Cheers,Andrés On Sun, Aug 3, 2014 at 1:19 PM, <jpff@cs.bath.ac.uk> wrote: Why do you think that the value of tree->next->line should be 0? It |
Date | 2014-08-03 20:10 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None |
Date | 2014-08-03 21:33 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None None |
That seems to be the issue. The issue seems to be errant and works sometimes, which points to an unitialized variable. Maybe it should be set to 0 after the parsing of the orc file? All incoming realtime orchestra code should be considered to have offset 0.Cheers, Andrés On Sun, Aug 3, 2014 at 2:10 PM, <jpff@cs.bath.ac.uk> wrote: Longer response. The initial line number is taken from |
Date | 2014-08-03 23:49 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None |
Date | 2014-08-04 14:02 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None |
Date | 2014-08-10 03:42 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Added test for line numbers that fails |
Attachments | None None |
There still seems to be something funky with line numbers. The line number value is sometimes left unitialized by the orc parser. When running in the debugger, I see strange values, and valgrind reports: so it is in fact the line number that hasn't been initialized.==29347== Conditional jump or move depends on uninitialised value(s) ==29347== at 0x4FEBDAE: opcode_perf_debug (csound.c:1599) ==29347== by 0x4FEC43C: kperf_debug (csound.c:1734) ==29347== by 0x4FEC998: csoundPerformKsmps (csound.c:1838) ==29347== by 0x401BF8: test_line_breakpoint (csound_debugger_test.c:234) ==29347== by 0x536D05F: ??? (in /usr/lib/libcunit.so.1.0.1) ==29347== by 0x536D375: ??? (in /usr/lib/libcunit.so.1.0.1) ==29347== by 0x536D69F: CU_run_all_tests (in /usr/lib/libcunit.so.1.0.1) ==29347== by 0x402273: main (csound_debugger_test.c:366) https://gist.github.com/mantaraya36/b1fd683d84d90e0cc75d csound.c:1599 reads: if (bp_node->line == linenum) { /* line matches */ | exprlist ',' label { /* $$ = make_node(',', $1, $3); */ $$ = appendToTree(csound, $1, make_leaf(csound, LINE,LOCN, LABEL_TOKEN, (ORCTOKEN *)$3)); } | exprlist ',' error Cheers, Andrés On Mon, Aug 4, 2014 at 8:02 AM, <jpff@cs.bath.ac.uk> wrote:
|