Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,319
    • Issues 4,319
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 355
    • Merge Requests 355
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #5504

Closed
Open
Opened Sep 23, 2011 by daniel.is.fischer@trac-daniel.is.fischer

Inconsistent sizes for struct rlimit

On my 32-bit system, I find

/* Define to Haskell type for rlim_t */
#define HTYPE_RLIM_T Word64

in HsBaseConfig.h. gcc says sizeof(rlim_t) = 4 and thus sizeof(struct rlimit) = 8.

Previously (7.0 and before), get/setResourceLimit allocated a 16-byte buffer and wrote/read the hard limit at an 8-byte offset, consistent with HsBaseConfig.h (but not with sys/resource.h), and apparently it worked (test resourceLimit used to pass and getting the limits returned the previously set values in a few tests for various resources).

Now they allocate 8 bytes and read/write the hard limit at a 4-byte offset, consistent with sys/resource.h, but inconsistent with HsBaseConfig.h, and resourceLimit fails, the same tests as above always returned ResourceLimit (2^64-1) for both, soft and hard limits. (The compiled ways of resourceLimit fail with invalid argument on setting.)

Trac metadata
Trac field Value
Version 7.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/unix
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#5504