|
From: | Boris Shingarov |
Subject: | Re: Coredump and orphan avoidance code. |
Date: | Sun, 27 Feb 2011 08:44:12 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
Hi Han-Wen, Thank you for pointing out this defect. I have created patch 4236027 to address it: http://codereview.appspot.com/4236047To answer your question, what the "if" was supposed to be doing: the idea was to guard against the situation where there the whole paragraph consists of only one line, because a one-line paragraph is allowed to be orphaned. But what I was not seeing, was that the increment-statement of the "for" had already advanced "list" to point to EOL by the time we reached that "if". Quite embarrassing actually.
Boris On 11-02-22 09:33 AM, Han-Wen Nienhuys wrote:
Hi Boris, I was looking at why \markuplines{} is dumping core, and came across code committed in commit 4878fcdb04b335041f1440c8d31b0b4b80ecaea9 Author: Boris Shingarov<address@hidden> Prob *ps; SCM list; for (list = texts ; scm_is_pair (list) ; list = scm_cdr (list)) ... if (list == texts) { complaints: 1. this code leaves ps and list uninitialized. Always initialize *all* local variables. 2. the if never fires, unless tests==SCM_EOL in the first place 3. Given that the if never fires, do we have a regression test that covers this code, and are you sure this actually does something useful? Can you please fix this, both the esthetics and the functionality; it is a release blocking problem.
[Prev in Thread] | Current Thread | [Next in Thread] |