Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pike
pike
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 105
    • Issues 105
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • pikelang
  • pikepike
  • Issues
  • #7712

Closed
Open
Opened Jun 09, 2016 by Peter Bortas@zinoOwner

Stdio.Buffer()->add_int32(0xffffffff) does not work on 32-bit systems

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7712

Reported by Per Cederqvist ceder@lysator.liu.se

The add_int32() method of Stdio.Buffer is supposed to accept any 32-bit number, in the range 0-0xffffffff. When Pike is compiled on a 64-bit system this works. But on a 32-bit i686 Debian 8 it fails:

Bad argument 1 to add_int32(). Expected int.
Unknown program: add_int32(4294967295)
-:1:
    _static_modules._Stdio()->Buffer(0 bytes, read=[..-1] data=[0..-1] free=[0
    ..224] allocated)->add_int32(4294967295)                                  
/home/minibuilder/buffer-fun.pike:6: /main()->main()

Test program:

#!/usr/bin/env pike8

int main()
{
  Stdio.Buffer buffer = Stdio.Buffer();
  buffer->add_int32(0xffffffff);
  werror("%O\n", buffer->read());
  return 0;
}

Tested with the current head of the 8.0 branch from the Git repo.

Assignee
Assign to
Pike 8.0
Milestone
Pike 8.0
Assign milestone
Time tracking
None
Due date
None
Reference: pikelang/pike#7712