WineHQ
Bug Tracking Database – Bug 34486

 Bugzilla

 

Last modified: 2013-11-15 13:40:32 UTC  

__unDName cannot demangle a string and shows error

Bug 34486 - __unDName cannot demangle a string and shows error
__unDName cannot demangle a string and shows error
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: msvcrt
1.7.1
x86 other
: P2 normal
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-09-11 05:18 UTC by Ivan Permyakov
Modified: 2013-11-15 13:40 UTC (History)
1 user (show)

See Also:
Regression SHA1:
Fixed by SHA1: 0df84ecf11cfeae695a95ba6887c69a02d67e186
Distribution: ---
Staged patchset:


Attachments
the fixed version (deleted)
2013-09-12 12:13 UTC, Ivan Permyakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Permyakov 2013-09-11 05:18:05 UTC
Here is an example:
?shouldStartThread@?$IterateKernel@Viterator@?$QList@PEAUsRenderingChunk@@@@X@QtConcurrent@@$4PPPPPPPM@7EAA_NXZ
Comment 1 Nikolay Sivov 2013-09-11 05:24:38 UTC
What system are you using and what's your wine version?
Comment 2 Ivan Permyakov 2013-09-11 05:31:11 UTC
I use these sources in my test project: 
http://source.winehq.org/source/dlls/msvcrt/undname.c

I think it's the latest version of Wine.
Comment 3 Ivan Permyakov 2013-09-11 06:17:34 UTC
The original UnDecorateSymbolName from dbhelp.dll returns the following value:
[thunk]:QtConcurrent::IterateKernel<class QList<struct sRenderingChunk *>::iterator,void>::shouldStartThread`vtordisp{4294967292,8}' (void)

I think that the problem in the function handle_template:

1200 static BOOL handle_template(struct parsed_symbol* sym)
1201 {
1202     const char* name;
1203     const char* args;
1204 
1205     assert(*sym->current == '$');
1206     sym->current++;
1207     if (!(name = get_literal_string(sym))) return FALSE;
1208     if (!(args = get_args(sym, NULL, FALSE, '<', '>'))) return FALSE;
1209     sym->result = str_printf(sym, "%s%s", name, args);
1210     return TRUE;
1211 }

At the beginning of this code sym->current has "$4PPPPPPPM@7EAA_NXZ" but it seems that "$4" is the sign of the numer "PPPPPPPM" (-4 = 4294967292) instead of the literal string "4PPPPPPPM"
Comment 4 Ivan Permyakov 2013-09-12 12:13:01 UTC
Created attachment 45926 [details]
the fixed version

I attached the modified version of your demangler. It has many fixes including the current bug.

P.S. "get_type_encoding" - it's the reversed code from dbghelp.dll. You can make it more beautiful if you need :))

P.P.S. I'm going to remove "handle_data" from sources and use the common "handle_method"
Comment 5 Nikolay Sivov 2013-09-12 12:41:09 UTC
(In reply to comment #4)
> 
> P.S. "get_type_encoding" - it's the reversed code from dbghelp.dll. You can
> make it more beautiful if you need :))
> 

Do you mean a reversed native dbghelp.dll from Windows?

I believe a fix was sent today http://www.winehq.org/pipermail/wine-patches/2013-September/126685.html.
Comment 6 Ivan Permyakov 2013-09-12 12:48:38 UTC
> Do you mean a reversed native dbghelp.dll from Windows?

Yes.
Comment 7 Alexandre Julliard 2013-09-12 12:58:05 UTC
The content of attachment 45926 [details] has been deleted by
    Alexandre Julliard <julliard@winehq.org>
who provided the following reason:

Disassembling windows code is not allowed

The token used to delete this attachment was generated at 2013-09-12 12:57:42 CDT.
Comment 8 Nikolay Sivov 2013-09-12 12:58:51 UTC
(In reply to comment #6)
> > Do you mean a reversed native dbghelp.dll from Windows?
> 
> Yes.

That's a violation of wine development rules, and of EULA as well. Be aware that you'll be most likely banned from getting any patches in wine (at least for dbghelp.dll).

Admin, could you please delete this attachment?
Comment 9 Bruno Jesus 2013-09-12 15:59:20 UTC
Piotr's patch was commited:
http://source.winehq.org/git/wine.git/commitdiff/0df84ecf11cfeae695a95ba6887c69a02d67e186
Comment 10 Piotr Caban 2013-09-12 16:19:08 UTC
Function specified in bug is now demangled correctly. Marking as fixed.
Comment 11 Alexandre Julliard 2013-09-13 13:19:51 UTC
Closing bugs fixed in 1.7.2.
Comment 12 Alexandre Julliard 2013-11-15 13:40:32 UTC
Removing 1.6.x milestone from bugs included in 1.6.1.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers