2009/4/29 Yuval Levy <[email protected]>:
>
> Lukáš Jirkovský wrote:
>> I'd like to see it in 0.8 realease, because it
>> seems to affect quite a lot of people (at least three ;-) )
>
> +1
> Yuv
>
> >
>
First, I've tested the patch and it seems to work. I've got strange
results sometimes, but it is may be caused by the way how the
optimization works (ie. I get them also with the unpatched hugin
sometimes). Still I'm not sure if it's right solution.
Anyway I've a good news. There is a new version of levmar with VERY
interesting changes:
* Fixed a couple of issues with memory alignment on 64 bit systems.
and looking into the code there ARE changes to the affected function
AND especially to the computation of tot_sz which seemed to be the
problematic part of code which caused crashes.
I've backported the changes from levmar 2.4. It doesn't seems to break
anything (and I'm not experiencing so much strange results, but it
could be luck). Patch is attached. Could you please test it, Milan?
Regards,
Lukáš "stativ" Jirkovský
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---
Index: src/foreign/levmar/misc_core.c
===================================================================
--- src/foreign/levmar/misc_core.c (revision 3813)
+++ src/foreign/levmar/misc_core.c (working copy)
@@ -332,7 +332,7 @@
a_sz=m*m;
u_sz=m*m; s_sz=m; vt_sz=m*m;
- tot_sz=iworksz*sizeof(int) + (a_sz + u_sz + s_sz + vt_sz + worksz)*sizeof(LM_REAL);
+ tot_sz=(a_sz + u_sz + s_sz + vt_sz + worksz)*sizeof(LM_REAL) + iworksz*sizeof(int); /* should be arranged in that order for proper doubles alignment */
buf_sz=tot_sz;
buf=(LM_REAL *)malloc(buf_sz);
@@ -422,7 +422,7 @@
a_sz=m*m;
x_sz=m;
work_sz=m;
- tot_sz=idx_sz*sizeof(int) + (a_sz+x_sz+work_sz)*sizeof(LM_REAL);
+ tot_sz=(a_sz + x_sz + work_sz)*sizeof(LM_REAL) + idx_sz*sizeof(int); /* should be arranged in that order for proper doubles alignment */
buf_sz=tot_sz;
buf=(void *)malloc(tot_sz);