891x902

xrctfy_xcity.jpg

๐Ÿ—‘๏ธ ๐Ÿงต How do I fix this Macintosh (Mac) (Apple Computer) OSX build of Computer Code.

Anonymous No. 906841

The old OSX build runs fine (built in 2012).
The new one, where the code is pretty much the same, compiles and runs, but when it gets to a strlcpy invocation; the OSX kernel decides some memory was used incorrectly and terminates the process.

If I "fix" (ie hack around with a check) the first strlcpy "situation" ("does this pointer have the same contents as the other thing we're copying too allready? If so don't bother"), then the error just migrates to the next sorta similar code (and this time a blatant "you're not allowed to do that" error).

This code runs fine under the most memory secure stringent grsecurity-linux kernel. So it isn't like we're using the stack for execution of data-only stuff.
It also runs fine under regular linux and windows.
The code has not changed in these instances in 15 years, and the rest of the engine code is almost all the same as the 2012 working OSX version that it was branched off of a decade ago.

And yet when we compile today, on a recent OSX (High Sierra, but installed a few days ago); "you're not allowed to do that" and then the OSX kernel Aborts the process explicitly when we simply copy the name of a shader to the name field of a texture. This has worked fine for 15 years, maybe 20 or 30.

This code originates from John Carmack and Id software or Lord "Forest Hale" havoc. They're both good programmers and Forest Hale is very careful.

How do I fix this.
It's not the code: it's the build environment, or maybe OSX now needs some sort of hacks etc which it didn't have.

In the code, strlncpy etc from OpenBSD is provided in darkplaces/common.h and common.c. For BSDs it's Idefe'd out as they allready have the function and there would be a conflict.

Remeber this code worked for 30 years straight, and 15 years without any tampering at all: up till now trying to compile it on "modern" OSX. And yes we are doing it on a mac-mini; not crosscompiling.

Please help.
ใŸใ™ใ‘ใฆ

1600x900

xc.jpg

Anonymous No. 906842

Yes I asked on stackexchange: they told me to fuck off. /g/ just deletes my post for "opposing trannyism" and "pedo"

892x321

Untitled222222222....jpg

Anonymous No. 906843

These are some backtraces and stuff we've done (Chris, my mac friend, came over the house to try to figure it out too; but he was unable to)

https://pastebin.com/YYpjt71d GDB of Sig Abort once asked to load a
map from OSX kernel

https://pastebin.com/z2Q3mKAd printfs to standard out were commented
out, but still sig abort from kernel
https://pastebin.com/hPnkBFai
https://pastebin.com/1bxkY3x8
https://pastebin.com/YaxNT0ea
https://pastebin.com/naVBCMb6


=https://pastebin.com/xjUEBfcb
https://pastebin.com/JZLN9GXC

https://pastebin.com/UJk8ufqz

https://pastebin.com/yN3NfQxx
https://pastebin.com/2Bb0RXnq


(lldb) print texture->name
(char [64]) $0 = "textures/common/caulk"
(lldb) print name
(const char *) $1 = 0x0000000107c770c8 "textures/common/caulk"
(lldb)

(That is correct: that's what is supposed to be in those variables; no error here)

874x336

Untitled222222222....jpg

Anonymous No. 906844

This is all from model_shared.c in darkplaces.
If one "defeats" the first strlcpy (ie by putting a hack that avoids the copy if the contents of both are at that point allready the same): the error just migrates down the code to the conditional at like 3161 or so:

>else if (!(texture->backgroundskinframes[j] = R_SkinFrame_LoadExternal(backgroundlayer->texturename[j], (backgroundlayer->texflags & texflagsmask) | texflagsor, false)))
> {
> Con_Printf("^1%s:^7 could not load texture ^3\"%s\"^7 (background frame %i) for shader ^2\"%s\"\n", loadmodel->name, backgroundlayer->texturename[j], j, texture->name);
>texture->backgroundskinframes[j] = R_SkinFrame_LoadMissing();
> }


The copyright line for this file is:
>/*
>Copyright (C) 1996-1997 Id Software, Inc.

>This program is free software; you can redistribute it and/or
>modify it under the terms of the GNU General Public License

Does this look familiar to you?
(Why or why not)


Id software didn't write
>shit code
Nor did the good Sir Lord Forest Hale Havoc.

It is not their code that is at fault.
And no code has been added in the interm regarding these functions. Infact they are the same in current darkplaces aswell.

The error doesn't show up until one tries to load a texture in a 3d map: so just running the binary and seeing that it loads doesn't help (which is what everyone does to see if the OSX build "works" (no one games on a Mac))

6016x4000

DSC_0575.jpg

Anonymous No. 906846

>>>/g/87614456
>Not helping you because you dont like Madoka from Madoka magica.

Incorrect, see pic related

1286x660

3rf33vr.png

Anonymous No. 906847

This is my 3d work

852x666

Untitledwww2www.png

Anonymous No. 906848

More 3d work.
It is all opensource
Just trying to fit in here.
Because I want build help with OSX build of the code.
Which I know you know people in your 3d jobs know how to do.
I want you to use company time to have them give advice.

1022x1022

m249parassforblen....png

Anonymous No. 906854

720x604

9xqy0s04r3jz.jpg

Anonymous No. 906855

850x677

fse.jpg

Anonymous No. 906856

300x168

stya.jpg

Anonymous No. 906857

923x923

m249parassforblen....png

Anonymous No. 906858

>.

731x600

Luna.jpg

๐Ÿ—‘๏ธ Anonymous No. 906863

Not helping you because you won't tell me your favorite pastel horse

1920x1080

Dat quality rende....jpg

3DGuy !!XhQDOznbDw3 No. 906896

>>906841
>How do I fix this Macintosh (Mac) (Apple Computer)
By buying a PC.