[omaha-dev] Issue 19 in omaha: memory bug in mi_exe_stub/minicrt

37 views
Skip to first unread message

om...@googlecode.com

unread,
Apr 26, 2010, 11:04:36 PM4/26/10
to omah...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 19 by bevan.collins: memory bug in mi_exe_stub/minicrt
http://code.google.com/p/omaha/issues/detail?id=19

What steps will reproduce the problem?
1. compile mi_exe_stub with VS2008
2. create a tagged metainstaller
3. run the tagged metainstaller, nothing happens

What is the expected output? What do you see instead?
installer downloaded and run. Nothing is shown instead, the metainstaller
process quits.

What version of the product are you using? On what operating system?
trunk. Windows7,VS2008

Please provide any additional information below.
I tried to debug it... it seemed that after assigning a string to
target_directory_name_ in tar.cc, the memory was corrupt. If I linked to
libcmt.lib,libcpmt.lib instead of minicrt.lib everything worked.
Adding this code to the Tar constructor and linking with minicrt results in
a blank message being displayed:
CString foo = _T("bar");
MessageBox(0, foo, _T(""), MB_OK);

sorry I haven't been able to figure out the exact problem in minicrt.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "Omaha Dev" group.
To post to this group, send email to omah...@googlegroups.com.
To unsubscribe from this group, send email to omaha-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omaha-dev?hl=en.

om...@googlecode.com

unread,
Sep 6, 2011, 7:27:43 PM9/6/11
to omah...@googlegroups.com

Comment #1 on issue 19 by bevan.co...@gmail.com: memory bug in
mi_exe_stub/minicrt
http://code.google.com/p/omaha/issues/detail?id=19

caused by some logic errors in memmove_s and memcpy_s. Fixed in revision 109

om...@googlecode.com

unread,
Jan 10, 2012, 6:01:58 AM1/10/12
to omah...@googlegroups.com

Comment #2 on issue 19 by ben.chal...@red-gate.com: memory bug in
mi_exe_stub/minicrt
http://code.google.com/p/omaha/issues/detail?id=19

Revision 109 did not fix the issue for me. Actually it changed so much in
mi_exe_stub/build.scons that this may be a new issue, but it has the same
symptoms for me with an optimized build on VS2008.

I can run and debug the optimized mi_exe_stub.exe (of course it quits early
as it doesn't contain the tarball). However the tagged
GoogleUpdateSetup.exe crashes with an access violation. ("First-chance
exception at 0x76619eff in OmahaDemoSetup.exe: 0xC0000005: Access violation
reading location 0x00000250. The instruction at 0000000077B71221 tried to
read from an invalid address, 0000000000000250.
Unhandled exception at 0x76619eff in OmahaDemoSetup.exe: 0xC000041D: An
unhandled exception was encountered during a user callback.")

Furthermore there was a spurious reference to the msvcr90.dll runtime.

To fix the issue I made the following changes:

1) Removed the reference to $WDK_PATH. This was necessary to get the
optimized build to build at all.
- if not temp_env.Bit('debug'):
- # Stubs for W2k compatibility.
- exe_inputs += '$WDK_PATH/lib/w2k/i386/msvcrt_win2000.obj',
+ #if not temp_env.Bit('debug'):
+ # # Stubs for W2k compatibility.
+ # exe_inputs += '$WDK_PATH/lib/w2k/i386/msvcrt_win2000.obj',

2) Linked to the static runtime lib to match the /MT switch.
- ('msvcrt', 'libcmtd')[temp_env.Bit('debug')],
- ('msvcprt', 'libcpmtd')[temp_env.Bit('debug')],
+ ('libcmt', 'libcmtd')[temp_env.Bit('debug')],
+ ('libcpmt', 'libcpmtd')[temp_env.Bit('debug')],

Hope this helps someone.

om...@googlecode.com

unread,
Mar 16, 2012, 3:41:35 PM3/16/12
to omah...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 19 by ryan...@google.com: memory bug in
mi_exe_stub/minicrt
http://code.google.com/p/omaha/issues/detail?id=19

(No comment was entered for this change.)

om...@googlecode.com

unread,
Jun 1, 2015, 7:47:14 PM6/1/15
to omah...@googlegroups.com

Comment #4 on issue 19 by vgachka...@gmail.com: memory bug in
mi_exe_stub/minicrt
https://code.google.com/p/omaha/issues/detail?id=19

Thanks to bevan.co...@gmail.com. This saved my day.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages