bugText Extractor TXR - Bugs: bug #34538, Fix buggy auto_str and static_str...

 
 

bug #34538: Fix buggy auto_str and static_str affecting Cygwin.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Thu 13 Oct 2011 12:29:11 AM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: CorrectnessStatus: Fixed
Privacy: PublicAssigned to: Kaz Kylheku <kkylheku>
Originator Name: Open/Closed: Closed
Component Version: 039Operating System: Microsoft Windows
Fixed Release: 040Planned Release: None
Architecture: AllABI: 32

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 13 Oct 2011 02:54:23 AM UTC, comment #1:

There turned out to be another bug. The following code in stream.c expects auto_str to accept a pointer which points to the first character in the stream:

{
wchar_t onech[] = wini(" ");
wref(onech)[0] = c_chr(ch);
return string_out_put_string(stream, auto_str((const wchli_t *) wref(onech)));
}

But the wli() macro returns an undisplaced pointer with a padding null at the beginning, and auto_str compensates for that.

I fixed things so that wli() returns a displaced pointer pointing to where the string actually starts, and fixed auto_str and static_str not do do any displacing, just add the type tag.

The above code is now correct, and the reported problem is fixed at the same time.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.
Thu 13 Oct 2011 12:29:11 AM UTC, original submission:

These functions should compute "(cnum) str + sizeof (wchar_t)" not "(cnum) str + 1".

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kkylheku (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Oct 2011 02:54:23 AM UTCkkylhekuStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>040

    Back to the top


    Powered by Savane 3.1-cleanup1