[Libreoffice-qa] DrMemory howto (for Windows) ...

Michael Meeks michael.meeks at suse.com
Wed Mar 14 14:09:42 PDT 2012


Hi guys,

	So - if you have a crasher bug on Windows, and the stack trace is
inside 'malloc' or 'free' or 'new' or 'delete' then most likely you have
a memory corruption - often intermittent bugs are these too.

	For these cases, there is a wonder-new-tool (for Windows), called
DrMemory; you get it here:

	http://www.drmemory.org/

	And you need to install it, and enable its insertion into your system
path. You should also get a windows build with debug symbols from:

	http://dev-builds.libreoffice.org/win32-debug/

	Then you'll need a console of some sort; as of now, in order to get
anything sensible from the tool, you want to run:

	drmemory -no_count_leaks -ignore_asserts -no_check_gdi -no_check_uninitialized -- soffice.exe

	That means you get rather further, hopefully to the point where it
crashes with your bug. Since the file-picker crashes drmemory itself,
you'll need to use 'recent files' or the command-line to be able to load
your document.

	Expect it to be -really- slow; that's normal :-) but it is doing some
clever things.

	Hopefully at the end of the day, your bug yields an:

Error #7: UNADDRESSABLE ACCESS: writing 0x2b9ca0f4-0x2b9ca0f8 4 byte(s)

	error log, which is a serious error and a very helpful trace around it.

	For the adventerous / those loving 'code lint' style tasks, there is a
new easy-hack to find / fix the long list of problems that the tool
shows up here:

	https://bugs.freedesktop.org/show_bug.cgi?id=47320

	I hope that helps people :-) getting a trace from drmemory in a report,
with symbols can shave around a man-day (or more) from a bug, and get a
fix much faster.

	HTH,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the Libreoffice-qa mailing list