don't forget I already reported a bug in the x64 build of stdlib
dealing with double's with the proposed fix.  I believe the person who
wrote it was already fixing it (either using the proposed patch or
their own method).

On Fri, Mar 1, 2013 at 5:13 AM, Mcdaniel, Daryl
<[email protected]> wrote:
> Thank you for reporting this and including the test program.
>
>
>
> I will investigate the problem and provide a response ASAP.
>
>
>
> Daryl McDaniel
>
>
>
>
>
> From: [email protected] [mailto:[email protected]]
> Sent: Friday, March 01, 2013 1:51 AM
> To: [email protected]
> Subject: [edk2] Crash seen while using %f in printf for X64 platform
> Importance: High
>
>
>
> Hi,
>
>      I am seeing crash when I run an application using %f in printf on X64
> platform. Please find the code and .inf file content below.
>
>
>
> Can anyone help me in this regard?
>
>
>
>
>
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>
>
> test.c
>
> --------
>
>
>
> #include  <stdio.h>
>
> #include  <wchar.h>
>
> #include  <stdlib.h>
>
> #include  <Uefi.h>
>
> #include  <Library/UefiLib.h>
>
> #include  <Library/ShellCEntryLib.h>
>
>
>
> int
>
> main (
>
>   IN int Argc,
>
>   IN char **Argv
>
>   )
>
> {
>
>   double temp = 0.0319;
>
>   wchar_t *str;
>
>
>
>   str = (wchar_t *) malloc(10);
>
>
>
>   if (NULL != str) {
>
>
>
>   printf("This is test\n");
>
>   printf("temp (f) = %f, temp (e) = %e\n", temp, temp);
>
>   printf("temp (d) = %d, temp (x) = 0x%x\n", (int)temp, (int)temp);
>
>
>
>   swprintf(str, 5, L"%0.2f", temp);
>
>   wprintf(L"str (ls) = %ls\n", (const wchar_t *)str);
>
>   printf("str (ls) = %ls, str (s) = %s, size (f) = %f\n", str, (char *)str,
> temp);
>
>
>
>   }
>
>   else {
>
>                 printf("str malloc failed\n");
>
>   }
>
>
>
>   return(0);
>
> }
>
>
>
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>
>
> test.inf
>
> ---------
>
>
>
> [Defines]
>
>   INF_VERSION                    = 0x00010006
>
>   BASE_NAME                      = Main
>
>   FILE_GUID                      = a912f198-7f0e-4803-b908-b757b806ec83
>
>   MODULE_TYPE                    = UEFI_APPLICATION
>
>   VERSION_STRING                 = 0.1
>
>   ENTRY_POINT                    = ShellCEntryLib
>
>
>
> #
>
> #  VALID_ARCHITECTURES           = IA32 X64 IPF
>
> #
>
>
>
> [Sources]
>
>   test.c
>
>
>
> [Packages]
>
>   StdLib/StdLib.dec
>
>   MdePkg/MdePkg.dec
>
>   ShellPkg/ShellPkg.dec
>
>
>
> [LibraryClasses]
>
>   #LibC
>
>   LibStdio
>
>   DevShell
>
>   UefiLib
>
>   ShellCEntryLib
>
>
>
>   [BuildOptions]
>
>   MSFT:*_*_IA32_CC_FLAGS  = /Oi-
>
>
>
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
>
>
>
>
> Thanks,
>
> Aniruddha. Herekar.
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to