Skip to content
Snippets Groups Projects
Commit cfc47e33 authored by Wilson Snyder's avatar Wilson Snyder
Browse files

Fix core dump on Storable store/retrieve, bug1063.

parent 21185565
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix duplicate cells when delete cells, bug1049. [Stefan Tauner]
**** Fix core dump on Storable store/retrieve, bug1063. [G Aydos]
* Verilog::Language 3.418 2016-02-02
......
......@@ -100,6 +100,7 @@ t/42_dumpcheck_2v.out
t/42_dumpcheck_sv.out
t/42_dumpcheck_v2k.out
t/42_dumpcheck_v2kv.out
t/43_storable.t
t/44_create.t
t/46_link.t
t/48_leak.t
......
......@@ -84,6 +84,13 @@ sub DESTROY {
$self->_DESTROY;
}
sub STORABLE_freeze {
my ($self, $cloning) = @_;
# Prevent crash on Storable::store then retrieve
delete $self->{_cthis};
return;
}
sub open {
my $self = shift;
my %params = (
......
#!/usr/bin/perl -w
# DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package
#
# Copyright 2000-2016 by Wilson Snyder. This program is free software;
# you can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
BEGIN { require "t/test_utils.pl"; }
use strict;
use Test;
use warnings;
$SIG{__WARN__} = sub {};
eval "use Storable;";
if ($@) {
plan tests => 1;
skip("Storable not installed so ignoring check (harmless)",1);
} else {
plan tests => 4;
eval "use Verilog::Netlist;";
ok(1);
if (1) {
my $nl = new Verilog::Netlist;
$nl->read_file(filename=>"verilog/v_hier_subsub.v");
ok(1);
Storable::store($nl, "test_dir/netlist.db");
ok(1);
}
if (1) {
my $nl = retrieve("test_dir/netlist.db");
ok(1);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment