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
6fab1e86
Commit
6fab1e86
authored
Nov 15, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: In undname functions, no longer use a fixed-size array for storing internal information.
parent
c65106e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
cpp.c
dlls/msvcrt/tests/cpp.c
+2
-0
undname.c
dlls/msvcrt/undname.c
+22
-6
No files found.
dlls/msvcrt/tests/cpp.c
View file @
6fab1e86
...
@@ -1032,6 +1032,8 @@ static void test_demangle(void)
...
@@ -1032,6 +1032,8 @@ static void test_demangle(void)
/* 111 */
{
"?f@T@@QAEHQCY1BE@BO@D@Z"
,
"public: int __thiscall T::f(char (volatile * const)[20][30])"
},
/* 111 */
{
"?f@T@@QAEHQCY1BE@BO@D@Z"
,
"public: int __thiscall T::f(char (volatile * const)[20][30])"
},
/* 112 */
{
"?f@T@@QAEHQAY2BE@BO@CI@D@Z"
,
"public: int __thiscall T::f(char (* const)[20][30][40])"
},
/* 112 */
{
"?f@T@@QAEHQAY2BE@BO@CI@D@Z"
,
"public: int __thiscall T::f(char (* const)[20][30][40])"
},
/* 113 */
{
"?f@T@@QAEHQAY1BE@BO@$$CBD@Z"
,
"public: int __thiscall T::f(char const (* const)[20][30])"
},
/* 113 */
{
"?f@T@@QAEHQAY1BE@BO@$$CBD@Z"
,
"public: int __thiscall T::f(char const (* const)[20][30])"
},
/* 114 */
{
"??0?$Foo@U?$vector_c@H$00$01$0?1$0A@$0A@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@@mpl@boost@@@@QAE@XZ"
,
"public: __thiscall Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647>>::Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647>>(void)"
},
};
};
int
i
,
num_test
=
(
sizeof
(
test
)
/
sizeof
(
test
[
0
]));
int
i
,
num_test
=
(
sizeof
(
test
)
/
sizeof
(
test
[
0
]));
...
...
dlls/msvcrt/undname.c
View file @
6fab1e86
...
@@ -73,13 +73,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
...
@@ -73,13 +73,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
*
*
*/
*/
#define MAX_ARRAY_ELTS 32
struct
array
struct
array
{
{
unsigned
start
;
/* first valid reference in array */
unsigned
start
;
/* first valid reference in array */
unsigned
num
;
/* total number of used elts */
unsigned
num
;
/* total number of used elts */
unsigned
max
;
unsigned
max
;
char
*
elts
[
MAX_ARRAY_ELTS
];
unsigned
alloc
;
char
**
elts
;
};
};
/* Structure holding a parsed symbol */
/* Structure holding a parsed symbol */
...
@@ -174,7 +174,8 @@ static void und_free_all(struct parsed_symbol* sym)
...
@@ -174,7 +174,8 @@ static void und_free_all(struct parsed_symbol* sym)
*/
*/
static
void
str_array_init
(
struct
array
*
a
)
static
void
str_array_init
(
struct
array
*
a
)
{
{
a
->
start
=
a
->
num
=
a
->
max
=
0
;
a
->
start
=
a
->
num
=
a
->
max
=
a
->
alloc
=
0
;
a
->
elts
=
NULL
;
}
}
/******************************************************************
/******************************************************************
...
@@ -184,10 +185,25 @@ static void str_array_init(struct array* a)
...
@@ -184,10 +185,25 @@ static void str_array_init(struct array* a)
static
BOOL
str_array_push
(
struct
parsed_symbol
*
sym
,
const
char
*
ptr
,
int
len
,
static
BOOL
str_array_push
(
struct
parsed_symbol
*
sym
,
const
char
*
ptr
,
int
len
,
struct
array
*
a
)
struct
array
*
a
)
{
{
char
**
new
;
assert
(
ptr
);
assert
(
ptr
);
assert
(
a
);
assert
(
a
);
if
(
a
->
num
>=
MAX_ARRAY_ELTS
)
return
FALSE
;
if
(
!
a
->
alloc
)
{
new
=
und_alloc
(
sym
,
(
a
->
alloc
=
32
)
*
sizeof
(
a
->
elts
[
0
]));
if
(
!
new
)
return
FALSE
;
a
->
elts
=
new
;
}
else
if
(
a
->
max
>=
a
->
alloc
)
{
new
=
und_alloc
(
sym
,
(
a
->
alloc
*
2
)
*
sizeof
(
a
->
elts
[
0
]));
if
(
!
new
)
return
FALSE
;
memcpy
(
new
,
a
->
elts
,
a
->
alloc
*
sizeof
(
a
->
elts
[
0
]));
a
->
alloc
*=
2
;
a
->
elts
=
new
;
}
if
(
len
==
-
1
)
len
=
strlen
(
ptr
);
if
(
len
==
-
1
)
len
=
strlen
(
ptr
);
a
->
elts
[
a
->
num
]
=
und_alloc
(
sym
,
len
+
1
);
a
->
elts
[
a
->
num
]
=
und_alloc
(
sym
,
len
+
1
);
assert
(
a
->
elts
[
a
->
num
]);
assert
(
a
->
elts
[
a
->
num
]);
...
@@ -1332,8 +1348,8 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
...
@@ -1332,8 +1348,8 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
switch
(
do_after
)
switch
(
do_after
)
{
{
case
1
:
case
2
:
case
1
:
case
2
:
sym
->
stack
.
num
=
sym
->
stack
.
max
=
1
;
if
(
!
str_array_push
(
sym
,
dashed_null
,
-
1
,
&
sym
->
stack
))
sym
->
stack
.
elts
[
0
]
=
dashed_null
;
return
FALSE
;
break
;
break
;
case
4
:
case
4
:
sym
->
result
=
(
char
*
)
function_name
;
sym
->
result
=
(
char
*
)
function_name
;
...
...
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