Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

replace drand48 by pcg #10

Open
rurban opened this issue Sep 11, 2015 · 0 comments
Open

replace drand48 by pcg #10

rurban opened this issue Sep 11, 2015 · 0 comments
Assignees
Milestone

Comments

@rurban
Copy link
Member

rurban commented Sep 11, 2015

See https://github.com/imneme/pcg-c-basic for the 32bit
and https://github.com/imneme/pcg-c for the 64bit variant. And my fork and fixes.

This is 20x faster and much better statistically.
Est. 3d

See also perl11/potion#99 for the results of the pcg branch in potion.

Or use the new xoroshift++, which should be even better. See https://www.reddit.com/r/programming/comments/4gtlfz/xoroshiro128_the_fastest_fullperiod_pseudorandom/
Nope: xoroshift128++ is officially broken.

@rurban rurban self-assigned this Sep 11, 2015
@rurban rurban added this to the v5.24.0 milestone Sep 13, 2015
@rurban rurban modified the milestones: v5.26.0, v5.24.0 May 10, 2016
rurban pushed a commit that referenced this issue Jun 5, 2016
The dlopen error contains the filename and is passed verbatim to printf.
so disable any % in the user-controlled name.

repro: mangle a so.
Breakpoint 3, SaveError (pat=0x1005ac486 "%s") at ./dlutils.c:188
188	        while ((end = strchr(end, '%'))) { *end = ' '; }
(gdb) p end
$1 = 0x10110ee00 "dlopen(/usr/src/perl/blead/cperl/lib/auto/%B/%B.bundle, 1):
no suitable image found.  Did find:\n\t/usr/src/perl/blead/cperl/lib/auto/B/B.bundle:
malformed mach-o image: load command #10 length (4096) wou"...
rurban pushed a commit that referenced this issue Jun 6, 2016
The dlopen error contains the filename and is passed verbatim to printf.
so disable any % in the user-controlled name.

repro: mangle a so.
Breakpoint 3, SaveError (pat=0x1005ac486 "%s") at ./dlutils.c:188
188	        while ((end = strchr(end, '%'))) { *end = ' '; }
(gdb) p end
$1 = 0x10110ee00 "dlopen(/usr/src/perl/blead/cperl/lib/auto/%B/%B.bundle, 1):
no suitable image found.  Did find:\n\t/usr/src/perl/blead/cperl/lib/auto/B/B.bundle:
malformed mach-o image: load command #10 length (4096) wou"...
@rurban rurban removed this from the v5.26.0c milestone Mar 2, 2017
@rurban rurban added this to the v5.28.0c milestone Apr 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant