Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1b819cbe
Commit
1b819cbe
authored
Aug 14, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use a valid parameter array when demangling a template name.
parent
277b2542
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
cpp.c
dlls/msvcrt/tests/cpp.c
+4
-3
undname.c
dlls/msvcrt/undname.c
+3
-1
No files found.
dlls/msvcrt/tests/cpp.c
View file @
1b819cbe
...
...
@@ -873,7 +873,7 @@ static int strcmp_space(const char *s1, const char *s2)
static
void
test_demangle
(
void
)
{
static
struct
{
const
char
*
in
;
const
char
*
out
;}
test
[]
=
{
static
struct
{
const
char
*
in
;
const
char
*
out
;
unsigned
int
flags
;
}
test
[]
=
{
{
"??0bad_alloc@std@@QAE@ABV01@@Z"
,
"public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)"
},
{
"??0bad_alloc@std@@QAE@PBD@Z"
,
"public: __thiscall std::bad_alloc::bad_alloc(char const *)"
},
{
"??0bad_cast@@AAE@PBQBD@Z"
,
"private: __thiscall bad_cast::bad_cast(char const * const *)"
},
...
...
@@ -976,15 +976,16 @@ static void test_demangle(void)
{
"??2?$aaa@AAUbbb@@AAUccc@@AAU2@@ddd@1eee@2@QAEHXZ"
,
"public: int __thiscall eee::eee::ddd::ddd::aaa<struct bbb &,struct ccc &,struct ccc &>::operator new(void)"
},
{
"?pSW@@3P6GHKPAX0PAU_tagSTACKFRAME@@0P6GH0K0KPAK@ZP6GPAX0K@ZP6GK0K@ZP6GK00PAU_tagADDRESS@@@Z@ZA"
,
"int (__stdcall* pSW)(unsigned long,void *,void *,struct _tagSTACKFRAME *,void *,int (__stdcall*)(void *,unsigned long,void *,unsigned long,unsigned long *),void * (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,void *,struct _tagADDRESS *))"
},
{
"?$_aaa@Vbbb@@"
,
"_aaa<class bbb>"
},
{
"??$_aaa@Vbbb@@"
,
"??$_aaa@Vbbb@@"
},
{
"?$aaa@Vbbb@ccc@@Vddd@2@"
,
"aaa<class ccc::bbb,class ccc::ddd>"
},
{
"??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z"
,
"public: __thiscall Foo<int (__stdcall*)(void *,void *)>::Foo<int (__stdcall*)(void *,void *)>(char *)"
},
{
"??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z"
,
"__thiscall Foo<int (__stdcall*)(void *,void *)>::Foo<int (__stdcall*)(void *,void *)>(char *)"
,
0x880
},
};
int
i
,
num_test
=
(
sizeof
(
test
)
/
sizeof
(
test
[
0
]));
char
*
name
;
for
(
i
=
0
;
i
<
num_test
;
i
++
)
{
name
=
p__unDName
(
0
,
test
[
i
].
in
,
0
,
pmalloc
,
pfree
,
0
);
name
=
p__unDName
(
0
,
test
[
i
].
in
,
0
,
pmalloc
,
pfree
,
test
[
i
].
flags
);
ok
(
name
!=
NULL
&&
!
strcmp_space
(
test
[
i
].
out
,
name
),
"Got name
\"
%s
\"
for %d
\n
"
,
name
,
i
);
pfree
(
name
);
...
...
dlls/msvcrt/undname.c
View file @
1b819cbe
...
...
@@ -442,11 +442,13 @@ static char* get_template_name(struct parsed_symbol* sym)
unsigned
num_mark
=
sym
->
names
.
num
;
unsigned
start_mark
=
sym
->
names
.
start
;
unsigned
stack_mark
=
sym
->
stack
.
num
;
struct
array
array_pmt
;
sym
->
names
.
start
=
sym
->
names
.
num
;
if
(
!
(
name
=
get_literal_string
(
sym
)))
return
FALSE
;
args
=
get_args
(
sym
,
NULL
,
FALSE
,
'<'
,
'>'
);
str_array_init
(
&
array_pmt
);
args
=
get_args
(
sym
,
&
array_pmt
,
FALSE
,
'<'
,
'>'
);
if
(
args
!=
NULL
)
name
=
str_printf
(
sym
,
"%s%s"
,
name
,
args
);
sym
->
names
.
num
=
num_mark
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment