github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2015-07-14 10:40 am

[dreamwidth/dw-free] 8dcc47: [#1488] Fix 'each' warning in Apache log following...

Branch: refs/heads/develop
Home: https://github.com/dreamwidth/dw-free
Commit: 8dcc47ff6ddcde54ee36fa72e5e1747c5f144a4b
https://github.com/dreamwidth/dw-free/commit/8dcc47ff6ddcde54ee36fa72e5e1747c5f144a4b
Author: Kareila <kareila@dreamwidth.org>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M cgi-bin/Apache/LiveJournal.pm

Log Message:
-----------
[#1488] Fix 'each' warning in Apache log following upgrade

Use of each() on hash after insertion without resetting hash iterator
results in undefined behavior, Perl interpreter: 0x7fc2b8f82500 at
/dreamhack/home/8398-kareila/dw/cgi-bin/Apache/LiveJournal.pm line 131.

Avoid this warning by iterating over the array returned by 'keys'
instead of using the 'each' operator. This has the happy side effect
of allowing us to delete keys within the loop instead of doing it as
a second step immediately afterward.

Fixes #1488.


Commit: bb2f64731d1577167e401bfafc246de0ec338736
https://github.com/dreamwidth/dw-free/commit/bb2f64731d1577167e401bfafc246de0ec338736
Author: Mark Smith <mark@qq.is>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M cgi-bin/Apache/LiveJournal.pm

Log Message:
-----------
Merge pull request #1489 from kareila/cleanup-2015q3

[#1488] Fix 'each' warning in Apache log following upgrade


Compare: https://github.com/dreamwidth/dw-free/compare/90d7a4cea4d3...bb2f64731d15