<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Rūdolfs,
    <div class="moz-cite-prefix">On 28.10.2014 14:38, Rūdolfs Bundulis
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAHtFw61rxQh=457ReM4QZCun4cd+rD-oLvrg9CoKhzGqmjHHYw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div style="">one more thing that I could find out in the
          sources but at this point if someone knows it would save time
          - are there any alignment constraints on the VRAM memory that
          is passed to the IFramebuffer object via<font color="#000000"
            face="Lucida Grande, Verdana, Geneva, Arial, sans-serif"><span
              style="font-size:12px"> the in octetPtr VRAM parameter? I
              would eventually need this memory to be 16-byte aligned
              but I already planned that I will have to do something
              about this, however if VirtualBox already gives some
              alignment guarantees it would be nice to know that I don't
              have to think about this. <br>
            </span></font></div>
      </div>
    </blockquote>
    Wondering what dead end you're moving yourself into... the VRAM
    attribute (and more, e.g. the usesGuestVRAM attribute is also
    affected) will be removed after VirtualBox 4.3, due to significant
    architectural changes, preparing for better separation between VMs
    and GUIs. This isn' finalized yet, but the direction is clear: keep
    implementation details out of the interface. On the other hand this
    information doesn't really help you much if you want a working
    solution with the currently released code.<br>
    <br>
    I've checked: the VRAM attribute pointer is ultimately allocated by
    malloc() or calloc(), and this means that your 16-byte alignment
    assumption should be OK on relevant (i.e. 64 bit) CPUs and
    reasonably recent C library, because they need to be prepared to
    deal with native data types of this size.<br>
    <br>
    Klaus<br>
    <blockquote
cite="mid:CAHtFw61rxQh=457ReM4QZCun4cd+rD-oLvrg9CoKhzGqmjHHYw@mail.gmail.com"
      type="cite">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2014-10-28 13:30 GMT+02:00 Rūdolfs
          Bundulis <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:rudolfs.bundulis@gmail.com" target="_blank">rudolfs.bundulis@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi Klaus,
              <div><br>
              </div>
              <div>thanks for the explanations, I'll try running the
                software under gdb to get more info - most likely it is
                my fault, simply with the current information from
                Visual Studio I've got zero hints. Thanks.</div>
            </div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">2014-10-28 12:39 GMT+02:00
                    Klaus Espenlaub <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:klaus.espenlaub@oracle.com"
                        target="_blank">klaus.espenlaub@oracle.com</a>></span>:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">Rūdolfs,<br>
                      <span><br>
                        On <a moz-do-not-send="true"
                          href="tel:27.10.2014" value="+37127102014"
                          target="_blank">27.10.2014</a> 22:39, Rūdolfs
                        Bundulis wrote:<br>
                        > Hi,<br>
                        ><br>
                        > my custom frontend for VirtualBox seemed to
                        work fine and stable but<br>
                        > then I started to play around with number
                        of CPU's and memory and I<br>
                        > started getting "An invalid or unaligned
                        stack was encountered during an<br>
                        > unwind operation" from VBoxREM.dll. I
                        downloaded the sources for<br>
                        > VirtualBox 4.3.18, built it for x64 debug
                        and started debugging.<br>
                        ><br>
                        > * The first weird thing was that I could
                        not find a .pdb file for<br>
                        > VBoxREM.dll, is that some kind of special
                        .dll? I have pdb files for<br>
                        > VBoxC.dll and friends under
                        "out\win.amd64\debug\stage\debug\bin" but I<br>
                        > can't find one for VBoxREM.dll.<br>
                        <br>
                      </span>That's expected... VBoxREM.dll is very
                      special, it contains the (qemu)<br>
                      recompiler, which must be built using gcc, and
                      that's the reason why<br>
                      there are no pdb files for it. It should contain
                      dwarf debug info<br>
                      straight in the dll, which gdb understands. Yes,
                      it's annoying because<br>
                      one has to pick the right debugger straight from
                      the beginning.<br>
                      <span><br>
                        > * The stack trace is (I know it won't give
                        much help):<br>
                        ><br>
                        > ntdll.dll!00007ffe679ac0b4()Unknown<br>
                        > ntdll.dll!00007ffe67913356()Unknown<br>
                        > msvcrt.dll!__longjmp_internal ()Unknown<br>
                        >  >VBoxREM.dll!000000006fb0f3c4()Unknown<br>
                        ><br>
                        > The frontend does not have any output from
                        VirtualBox on stdout or<br>
                        > stderr and the logfile also does not show
                        any errors.<br>
                        ><br>
                        > Could anyone provide any pointers how
                        should I approach debugging this?<br>
                        <br>
                      </span>Hope gdb is helpful.<br>
                      <br>
                      On modern hardware which supports VT-x/AMD-V it's
                      somewhat unexpected<br>
                      that you end up in the recompiler, but there are
                      some corner cases which<br>
                      it is still used for.<br>
                      <br>
                      Klaus<br>
                      <br>
                      ><br>
                      > Best Regards,<br>
                      > Rudolfs Bundulis<font color="#4B7D42"
                        face="Verdana, Arial, Helvetica, sans-serif"
                        size="1"></font>
                    </blockquote>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </body>
</html>