adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
nicoo has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
jao has quit [Read error: Connection reset by peer]
porchetta has quit [Ping timeout: 246 seconds]
TakinOver has joined #ocaml
porchetta has joined #ocaml
jmagnusj has joined #ocaml
jao has joined #ocaml
olle has quit [Ping timeout: 246 seconds]
olle has joined #ocaml
dborisog has joined #ocaml
wingsorc has joined #ocaml
wingsorc has quit [Quit: Leaving]
mfp has quit [Ping timeout: 264 seconds]
lyxia has quit [Ping timeout: 244 seconds]
lyxia has joined #ocaml
objmagic has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mbuf has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
objmagic has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
nullcone has joined #ocaml
sugarwren has joined #ocaml
chripell has joined #ocaml
olle__ has joined #ocaml
Anarchos has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
ryxai has joined #ocaml
Anarchos2 has joined #ocaml
Anarchos has quit [Ping timeout: 260 seconds]
andreas303 has joined #ocaml
def has quit [Remote host closed the connection]
def has joined #ocaml
def has left #ocaml [#ocaml]
def has joined #ocaml
ryxai has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcone has quit [Quit: Connection closed for inactivity]
pigeonv has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
zolk3ri has joined #ocaml
Haudegen has joined #ocaml
corecode has joined #ocaml
<corecode> hi
<corecode> i think i found a bug in camlzip; campzip_new_stream in zlibstubs.c allocates a a new custom, but zlib expects its location not to change
<corecode> am i diagnosing this right?
sz0 has quit [Ping timeout: 260 seconds]
terrorjack has quit [Ping timeout: 260 seconds]
<corecode> or not? basically i'm observing that the zlib z_streamp pointer changes during runtime
sz0 has joined #ocaml
terrorjack has joined #ocaml
pigeonv has quit [Ping timeout: 265 seconds]
Anarchos2 has quit [Quit: Vision[0.10.3]: i've been blurred!]
<flux1> corecode: does it crash?
<flux1> I don't know the code, but can it also be the case that the location of the pointer changes, but the pointee's location stays the same
<flux1> granted OCaml bindings can be tricky, but camlzip is an older one, I'd think it has gotten it right..
<corecode> correction: it seems to allocate only a custom for the pointer to a struct, then a caml_stat_alloc() for the struct itself
<corecode> yea it looks right
<corecode> but i can see the struct address change
<corecode> and then zlib is unhappy
<flux1> well, that's not good :)
<corecode> the question is, why does the address change
<corecode> i.e. pointer itself
<corecode> surprisingly the contents of the struct don't change
<corecode> so something copied them
<flux1> compacting garbage collection
<corecode> yea that was my thought
<corecode> are blocks allocated by caml_stat_alloc() allowed to be moved?
<flux1> it should either register the address as a GC root, or add a layer of indirection. amazing camlzip didn't get it right.
<corecode> i can't find documentation for that function
<corecode> it looks correct, i didn't read it right first
<flux1> it seems caml_tat_alloc returns a normal memory block, so yes, it can move
<corecode> how would i find this information?
<flux1> hmm
<flux1> I'm reading runtime/caml/memory.h from the OCaml source
<corecode> without asking you, i mean
<corecode> ok
<flux1> "[caml_stat_*] functions below provide an interface to the static memory manager built into the runtime, which can be used for managing static (that is, non-moving) blocks of heap memory."
<flux1> I've never used them but it sounds like they shouldn't move :)
<flux1> maybe it's an OCaml bug?
<corecode> i hope not :)
<flux1> it could be a regression
<flux1> which OCaml version?
<corecode> 4.10.0
<flux1> so a very recent one. with memory management changes perhaps..
pigeonv has joined #ocaml
<flux1> https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html btw documents these functions, if you search for it
<corecode> the code looks fine
<corecode> how could i catch this in the act
<flux1> (briefly)
<corecode> without running this huge program where i observe this
<corecode> or with running it
<flux1> sprinkle your test case with calls to `Gc.compact ()`
<corecode> i guess if i can attach a read breakpoint on the reserved field...
<flux1> it will destroy the performance but the likelihood of encountering the issue increases greatly as well
<corecode> then i see who is copying it
<flux1> also I guess it doesn't hurt to ensure you're allocating so stuff does get moved 🤔
jao has joined #ocaml
raver has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
<corecode> duh, sorry
<corecode> packaging problem, used old camlzip source
<corecode> flux1: thanks for the sanity check!
corecode has left #ocaml ["ERC (IRC client for Emacs 26.3)"]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<flux1> :)
raver has joined #ocaml
objmagic has joined #ocaml
waleee-cl has joined #ocaml
olle__ has quit [Ping timeout: 272 seconds]
Haudegen has quit [Quit: Bin weg.]
chripell_ has joined #ocaml
chripell has quit [Ping timeout: 260 seconds]
X-Scale` has joined #ocaml
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
dborisog has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
* olle mooo
sleepydog has joined #ocaml
HyperMonkey has quit [Remote host closed the connection]
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has quit [Remote host closed the connection]
jao has joined #ocaml
mbuf has quit [Remote host closed the connection]
sugarwren has quit [Quit: Leaving]
jnavila has joined #ocaml
jnavila has quit [Remote host closed the connection]
jnavila has joined #ocaml
objmagic has joined #ocaml
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 258 seconds]
Jesin has quit [Quit: Leaving]
zmt00 has quit [Quit: Leaving]
zmt00 has joined #ocaml
sleepydog has quit [Ping timeout: 256 seconds]
cheater has quit [Ping timeout: 240 seconds]
cheater has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
Jesin has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
sleepydog has joined #ocaml
Jesin has quit [Quit: Leaving]
sleepydog has quit [Read error: Connection reset by peer]
andreas303 has quit [Remote host closed the connection]
Jesin has joined #ocaml
andreas303 has joined #ocaml
cheater has quit [Ping timeout: 240 seconds]
cheater has joined #ocaml
infinity0 has quit [Ping timeout: 265 seconds]
infinity0 has joined #ocaml
kvda has joined #ocaml
kvda has quit [Ping timeout: 265 seconds]