Page MenuHomeFeedback Tracker

String representation of pointers on Linux
New, NormalPublic

Description

String representation of pointers are different on Windows and Linux.
The differences compared to Windows are:

  • 0x prefix is duplicated
  • No padding with leading zeros
  • Null pointer is represented as 0x(nil)
  • Letters are in lower case

At least the duplicate prefix is for sure not intentional.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Linux x64
Category
General
Steps To Reproduce

Mod ArmaReforgerScripted to print various entity IDs on game start. Example:

modded class ArmaReforgerScripted : ChimeraGame
{
	//------------------------------------------------------------------------------------------------
	override bool OnGameStart()
	{
		Print("----------");
		Print(EntityID.INVALID.ToString());
		Print(EntityID.FromInt(0, 0).ToString());
		Print(EntityID.FromInt(0, 343).ToString());
		Print(EntityID.FromInt(551, 343).ToString());
		Print(EntityID.FromInt(55111, 0).ToString());
		Print(EntityID.FromInt(4114967295, 4114967295).ToString());
		Print("----------");
		
		return super.OnGameStart();
	}
}

The results on Windows (Workbench):

SCRIPT       : 0x0000000000000000 {}
SCRIPT       : 0x0000000000000000 {}
SCRIPT       : 0x0000000000000157 {}
SCRIPT       : 0x0000022700000157 {}
SCRIPT       : 0x0000D74700000000 {}
SCRIPT       : 0xF5456AFFF5456AFF {}

Results on Linux (Dedicated server):

15:55:41.469 SCRIPT       : 0x(nil) {}
15:55:41.469 SCRIPT       : 0x(nil) {}
15:55:41.469 SCRIPT       : 0x0x157 {}
15:55:41.469 SCRIPT       : 0x0x22700000157 {}
15:55:41.469 SCRIPT       : 0x0xd74700000000 {}
15:55:41.469 SCRIPT       : 0x0xf5456afff5456aff {}
Additional Information

Event Timeline

ookexoo created this task.Sat, Jan 18, 5:34 PM
ookexoo edited Additional Information. (Show Details)Sat, Jan 18, 5:55 PM