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
[PATCH] fix SEGV in XS::APItest::Backrefs::Comctl32Version() #16508
Comments
From @bulk88Created by @bulk88This is intended for 5.28. Follow on to Perl Info
|
From @bulk880001-fix-SEGV-in-XS-APItest-Backrefs-Comctl32Version.patch>From 5bcf555c8adbaf5127416f50701b26026e28f214 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Thu, 12 Apr 2018 14:53:09 -0400
Subject: [PATCH] fix SEGV in XS::APItest::Backrefs::Comctl32Version()
really old Mingw GCCs (3.4.5 specifically) dont implement _alloca
correctly, switch to a simpler variation
a follow on to perl #133084 and see also problems I had with alloca on
very old GCCs in https://rt.cpan.org/Public/Bug/Display.html?id=80217
---
ext/XS-APItest/APItest.pm | 2 +-
ext/XS-APItest/APItest.xs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm
index 8eda0f7..b98ccf8 100644
--- a/ext/XS-APItest/APItest.pm
+++ b/ext/XS-APItest/APItest.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Carp;
-our $VERSION = '0.96';
+our $VERSION = '0.97';
require XSLoader;
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 18e5b1c..b9e9b09 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -6808,7 +6808,7 @@ Comctl32Version()
croak("Comctl32Version: comctl32.dll no version???");
ver = LoadResource(dll, hrsc);
len = SizeofResource(dll, hrsc);
- vercopy = _alloca(len);
+ vercopy = (void *)sv_grow(sv_newmortal(),len);
memcpy(vercopy, ver, len);
if (VerQueryValue(vercopy, "\\", (void**)&info, &len)) {
int dwValueMS1 = (info->dwFileVersionMS>>16);
--
2.5.0.windows.1
|
From @tonycozOn Sat, 14 Apr 2018 13:53:24 -0700, bulk88 wrote:
Thanks, applied as 2f145a2. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88Created by @bulk88See attached patch. This is intended for 5.28. Follow on to Perl Info
|
From @bulk880001-fix-SEGV-in-XS-APItest-Backrefs-Comctl32Version.patchFrom 5bcf555c8adbaf5127416f50701b26026e28f214 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Thu, 12 Apr 2018 14:53:09 -0400
Subject: [PATCH] fix SEGV in XS::APItest::Backrefs::Comctl32Version()
really old Mingw GCCs (3.4.5 specifically) dont implement _alloca
correctly, switch to a simpler variation
a follow on to perl #133084 and see also problems I had with alloca on
very old GCCs in https://rt.cpan.org/Public/Bug/Display.html?id=80217
---
ext/XS-APItest/APItest.pm | 2 +-
ext/XS-APItest/APItest.xs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm
index 8eda0f7..b98ccf8 100644
--- a/ext/XS-APItest/APItest.pm
+++ b/ext/XS-APItest/APItest.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Carp;
-our $VERSION = '0.96';
+our $VERSION = '0.97';
require XSLoader;
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 18e5b1c..b9e9b09 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -6808,7 +6808,7 @@ Comctl32Version()
croak("Comctl32Version: comctl32.dll no version???");
ver = LoadResource(dll, hrsc);
len = SizeofResource(dll, hrsc);
- vercopy = _alloca(len);
+ vercopy = (void *)sv_grow(sv_newmortal(),len);
memcpy(vercopy, ver, len);
if (VerQueryValue(vercopy, "\\", (void**)&info, &len)) {
int dwValueMS1 = (info->dwFileVersionMS>>16);
--
2.5.0.windows.1
|
@tonycoz - Status changed from 'open' to 'pending release' |
From @steve-m-hayDuplicate of [perl #133113], which is fixed (pending release). Will merge into that ticket... |
From [Unknown Contact. See original ticket]Duplicate of [perl #133113], which is fixed (pending release). Will merge into that ticket... |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been Perl 5.28.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#133113 (status was 'resolved')
Searchable as RT133113$
The text was updated successfully, but these errors were encountered: