patchGNU Octave - Patches: patch #8156, randmtzig.c: prevent left-shift of...

 
 

patch #8156: randmtzig.c: prevent left-shift of a 1 into sign bit in oct_init_by_entropy().

Submitter:  Philipp Kutin <pkutin>
Submitted:  Wed 07 Aug 2013 11:08:37 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  jordigh Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 Aug 2013 03:33:55 PM UTC, comment #3: 


> I was just under the impression that "hg import" doesn't complain as long as there are no conflicts.


Yeah, for this reason I typically use "hg import --exact" so that the patch gets applied at the location in which it was created, so that no conflicts can ensue. I can then use merge logic to rebase instead of figuring out .rej files.

> I'll read up on the bookmark and mq stuff.


I recommend bookmarks, but I consider MQ obsolete. Instead, use histedit, rebase, and `hg commit --amend`. You can also do "hg pull --rebase" to keep your private patches rebased.

I have rebased your patch to default and applied it:

http://hg.savannah.gnu.org/hgweb/octave/rev/aada14bf74ed

Thanks.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 07 Aug 2013 03:22:38 PM UTC, comment #2: 


> Is it ok if I rebase it to the default branch?


Sure. I'm only working in classdef-pk because classdef is the branch I'm most interested in. If that gives you trouble, I'll commit into my default, no problem. I was just under the impression that "hg import" doesn't complain as long as there are no conflicts.

I'll read up on the bookmark and mq stuff. Until now, I did some minimal management using the histedit extension (deleted my waitbar.m patches since I don't want them duplicated when they arrive from the Octave repos).

Philipp Kutin <pkutin>
Wed 07 Aug 2013 01:01:08 PM UTC, comment #1: 

The patch looks good, but is there a particular reason to keep it in the classdef-pk branch? Is it ok if I rebase it to the default branch?

Also, don't create extra named branches. Instead, use bookmarks:

    http://mercurial.selenic.com/wiki/Bookmarks/

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 07 Aug 2013 11:08:37 AM UTC, original submission:  
  • randmtzig.c: in expression "word[0] + ... + (word[3]<<24)", cast the latter to uint32_t before shifting, preventing (C99) undefined behavior.
Philipp Kutin <pkutin>

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by pkutin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-07 rik5 Open/ClosedOpen Closed
    2013-08-07 jordigh StatusIn Progress Done
    2013-08-07 jordigh StatusNone In Progress
        Assigned toNone jordigh
    2013-08-07 pkutin Attached File- Added randmtzig-c-prevent-left-shift-of-a-1-into-sign-bit.patch, #28784

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code