Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[OWBugzilla] [Bug 1155] New: Call calloc() failed when compiled with watcom for win 7 32bit etc.

1 view
Skip to first unread message

bugzill...@www.openwatcom.org

unread,
Sep 24, 2014, 2:44:15 AM9/24/14
to openwatco...@openwatcom.org
http://bugzilla.openwatcom.org/show_bug.cgi?id=1155

Summary: Call calloc() failed when compiled with watcom for win 7
32bit etc.
Product: Open Watcom C/C++ Compiler
Version: OW 1.9
Platform: Win32 hosted tools
OS/Version: Windows 7
Status: UNCONFIRMED
Severity: major
Priority: --
Component: cl386.exe
AssignedTo: openwatco...@openwatcom.org
ReportedBy: 881...@qq.com


Hi, All
I have a C code below.
#include <stdio.h>
#include <stdlib.h>
int main() {
double *p;
long cells = 22000896;
p = (double*)calloc((unsigned)cells, sizeof(double));
if (p == NULL) {
printf("The calloc is NULL\n");
} else {
printf("The calloc succeed\n");
}

return 0;
}

Compiled with watcom with command: wcl386 /l=dos4g test.c
Running the DOS application, I always got message "The calloc is NULL".
The test code runs OK in windows XP and failed in Windows Server 2003 R2 and
Win 7 32bit.
So, I'm not sure what happened for this, any advice is benefit for this issue.
maybe it's a defect. thanks


--
Configure bugmail: http://bugzilla.openwatcom.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
0 new messages