Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P50
FlexArray memory heap-use-after-free
Active
Public
Actions
Authored by
mduminer
on Dec 20 2019, 10:15 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
hpp
file
#include
"pawlib/flex_array.hpp"
#include
<iostream>
#include
<memory>
class
Container
{
public
:
Container
();
private
:
std
::
shared_ptr
<
FlexArray
<
std
::
shared_ptr
<
FlexArray
<
int
>>>>
array
;
};
void
test_flex_array
();
cpp
file
#include
"sandbox/flex_array_test.hpp"
Container
::
Container
()
{
array
=
std
::
make_shared
<
FlexArray
<
std
::
shared_ptr
<
FlexArray
<
int
>>>>
();
for
(
int
i
=
0
;
i
<
20
;
++
i
)
{
std
::
cout
<<
"Preparing to push Inner # "
<<
i
<<
std
::
endl
;
auto
inner
=
std
::
make_shared
<
FlexArray
<
int
>>
();
array
->
push
(
inner
);
}
}
void
test_flex_array
()
{
Container
();
}
Event Timeline
mduminer
created this paste.
Dec 20 2019, 10:15 AM
2019-12-20 10:15:04 (UTC-8)
Log In to Comment