Technical article 111981

SCO OpenServer 5, malloc(S) can cause core dumps when passed very large values, or negative values.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

The malloc functions can cause internal program corruption if
passed a very large size value (for example, greater than 2Gb),
or if passed a negative value.  This internal corruption leads
to a core dump when subsequent routines try to allocate or use
memory.

Solution

This has been reported to SCO Engineering and has been fixed for the next SCO OpenServer release.

To avoid the problem, ensure that the value of the "size" argument passed to malloc is between 0 and 2Gb.

See also

Manual page for malloc(S)

From the Xinuos technical article database, record 111981. Reproduced with permission. The original is at www.sco.com/ta/111981, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.