New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hinthash is not saved during compilation time #220

Closed
atoomic opened this Issue Sep 30, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@atoomic
Collaborator

atoomic commented Sep 30, 2015

This is probably not a big deal, as this is mainly an internal variable

Env:
perl 5.20.2
B::C using bc522 with HEAD @734e776 ( cannot use 23016e1 with 5.20 )

> cat op/caller.t
#!./perl
# Tests for caller()

BEGIN { $^H{dooot} = -42 }

sub hint_fetch {
    my $key = shift;

    my @results = caller(0);
    $results[10]->{$key};
}

print qq{ok\n} if hint_fetch('dooot') == -42;
> perl op/caller.t
ok
> perlcc -r op/caller.t
@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Oct 2, 2015

Owner

That's the compile-time hints hash %^H, which is PL_compiling.cop_hints_hash.

The run-time cop_hints are stored correctly, but here the bug is that the run-time cop_hints (from main_cv) should take over the values from PL_hints.

Owner

rurban commented Oct 2, 2015

That's the compile-time hints hash %^H, which is PL_compiling.cop_hints_hash.

The run-time cop_hints are stored correctly, but here the bug is that the run-time cop_hints (from main_cv) should take over the values from PL_hints.

rurban pushed a commit that referenced this issue Nov 14, 2015

Reini Urban
coretests: adjust op/eval.t test 125 for #220
fixed op/anonconst.t, op/dump.t

rurban pushed a commit that referenced this issue Nov 14, 2015

Reini Urban
coretests: adjust op/eval.t test 125 for #220
fixed op/anonconst.t, op/dump.t

rurban pushed a commit that referenced this issue Nov 19, 2015

Reini Urban
C: save %^H hints hash
GH #220 (testcase still WIP)

rurban pushed a commit that referenced this issue Nov 19, 2015

Reini Urban
C: save %^H hints hash
GH #220 (testcase still WIP)
@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Nov 19, 2015

Owner

use open #31 is related to not storing %^H
testcases: t/testc.sh -q -k -O0 130 180 203 2900 220 250 302 304

Owner

rurban commented Nov 19, 2015

use open #31 is related to not storing %^H
testcases: t/testc.sh -q -k -O0 130 180 203 2900 220 250 302 304

rurban pushed a commit that referenced this issue Nov 19, 2015

Reini Urban
C: store COP->hints_hash
But the cophh/B::RHE chain is not yet stored efficiently.
Fixes t/testc.sh -q -k -O0 130 180 220 250 302
Issues GH #220, but use open #31 not yet, i.e. $^H{open<}

rurban pushed a commit that referenced this issue Nov 19, 2015

Reini Urban
C 1.52_22: save COP->hints_hash
Fixes GH #220

move global state to save_context
This has nothing to do in modules.

But the cophh/B::RHE chain is not yet stored efficiently.

Fixes t/testc.sh -q -k -O0 130 180 220 250 302
but broke 240 242
use open #31 not yet, i.e. $^H{open<}
@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Nov 20, 2015

Owner

Fixed with:
commit 2855398
Author: Reini Urban rurban@cpanel.net
Date: Fri Nov 20 09:31:00 2015 +0100

C: fix labels with hints_hash

store labels after the hints_hash, so that they
are not overwritten, just added.
Also skip labels (key=":") in the hints_hash loop.
Fixes remaining fails 240,242

commit 0da3356
Author: Reini Urban rurban@cpanel.net
Date: Fri Nov 20 00:19:28 2015 +0100

C: support COPHH from 5.10 - 5.12 also

< 5.10 %^H is unsupported. no hints hash,
just lexical cop_io defaults (NYI)

commit 0c3697d
Author: Reini Urban rurban@cpanel.net
Date: Thu Nov 19 23:51:17 2015 +0100

C: cache cophh ptrs, and support utf8 %^H keys

commit cab48ce
Author: Reini Urban rurban@cpanel.net
Date: Thu Nov 19 23:18:47 2015 +0100

C: delete dead global hints_hash code

hints_hash is only accessible from COPs

commit 4ab03cc
Author: Reini Urban rurban@cpanel.net
Date: Thu Nov 19 14:44:45 2015 +0100

C 1.52_22: save COP->hints_hash

Fixes GH #220

move global state to save_context
This has nothing to do in modules.

But the cophh/B::RHE chain is not yet stored efficiently.

Fixes t/testc.sh -q -k -O0 130 180 220 250 302
but broke 240 242
use open #31 not yet, i.e. $^H{open<}

Fixed 5.22 coretests:
op/signatures.t op/state.t op/attrproto.t op/const-optree.t op/taint.t uni/chr.t

Owner

rurban commented Nov 20, 2015

Fixed with:
commit 2855398
Author: Reini Urban rurban@cpanel.net
Date: Fri Nov 20 09:31:00 2015 +0100

C: fix labels with hints_hash

store labels after the hints_hash, so that they
are not overwritten, just added.
Also skip labels (key=":") in the hints_hash loop.
Fixes remaining fails 240,242

commit 0da3356
Author: Reini Urban rurban@cpanel.net
Date: Fri Nov 20 00:19:28 2015 +0100

C: support COPHH from 5.10 - 5.12 also

< 5.10 %^H is unsupported. no hints hash,
just lexical cop_io defaults (NYI)

commit 0c3697d
Author: Reini Urban rurban@cpanel.net
Date: Thu Nov 19 23:51:17 2015 +0100

C: cache cophh ptrs, and support utf8 %^H keys

commit cab48ce
Author: Reini Urban rurban@cpanel.net
Date: Thu Nov 19 23:18:47 2015 +0100

C: delete dead global hints_hash code

hints_hash is only accessible from COPs

commit 4ab03cc
Author: Reini Urban rurban@cpanel.net
Date: Thu Nov 19 14:44:45 2015 +0100

C 1.52_22: save COP->hints_hash

Fixes GH #220

move global state to save_context
This has nothing to do in modules.

But the cophh/B::RHE chain is not yet stored efficiently.

Fixes t/testc.sh -q -k -O0 130 180 220 250 302
but broke 240 242
use open #31 not yet, i.e. $^H{open<}

Fixed 5.22 coretests:
op/signatures.t op/state.t op/attrproto.t op/const-optree.t op/taint.t uni/chr.t

@rurban rurban closed this Nov 20, 2015

rurban pushed a commit that referenced this issue Nov 20, 2015

Reini Urban
coretests: adjust op/eval.t test 125 for #220
fixed op/anonconst.t, op/dump.t

rurban pushed a commit that referenced this issue Nov 20, 2015

Reini Urban
coretests: adjust op/eval.t test 125 for #220
fixed op/anonconst.t, op/dump.t

rurban pushed a commit that referenced this issue Nov 20, 2015

Reini Urban
coretests: adjust op/eval.t test 125 for #220
fixed op/anonconst.t, op/dump.t

rurban pushed a commit to CpanelInc/perl-compiler that referenced this issue Dec 10, 2015

C 1.52_22: save COP->hints_hash
Fixes GH rurban#220

move global state to save_context
This has nothing to do in modules.

But the cophh/B::RHE chain is not yet stored efficiently.

Fixes t/testc.sh -q -k -O0 130 180 220 250 302
but broke 240 242
use open #31 not yet, i.e. $^H{open<}

(cherry picked from commit 4ab03cc)
Signed-off-by: Nicolas Rochelemagne <rochelemagne@cpanel.net>

rurban pushed a commit to CpanelInc/perl-compiler that referenced this issue Dec 10, 2015

C 1.52_22: save COP->hints_hash
Fixes GH rurban#220

move global state to save_context
This has nothing to do in modules.

But the cophh/B::RHE chain is not yet stored efficiently.

Fixes t/testc.sh -q -k -O0 130 180 220 250 302
but broke 240 242
use open #31 not yet, i.e. $^H{open<}

(cherry picked from commit 4ab03cc)
Signed-off-by: Nicolas Rochelemagne <rochelemagne@cpanel.net>

=> introduce many regressions....

rurban pushed a commit that referenced this issue May 9, 2016

Reini Urban
C 1.54_05: fix refcount of cop hints hashes
for v5.22-nt only, revert the refcount bump from 1.54.
fixes #220: t/issue220.t

atoomic added a commit to CpanelInc/perl-compiler that referenced this issue Aug 9, 2016

C 1.52_22: save COP->hints_hash
Fixes GH rurban#220

move global state to save_context
This has nothing to do in modules.

But the cophh/B::RHE chain is not yet stored efficiently.

Fixes t/testc.sh -q -k -O0 130 180 220 250 302
but broke 240 242
use open #31 not yet, i.e. $^H{open<}

(cherry picked from commit 4ab03cc)
Signed-off-by: Nicolas Rochelemagne <rochelemagne@cpanel.net>

=> introduce many regressions....

rurban added a commit that referenced this issue Mar 8, 2018

untodo 5.26 tests
only TODO wrong @- values #220, #281, #295 in t/issue281.t
remain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment