<dtz>
> If either dest or src is a null pointer, the behavior is undefined, even if count is zero.
<shlevy>
dtz: Just checked the C spec, nothing about that there
<dtz>
yeah, I don't know that it is either. Maybe a C++ thing
<dtz>
TBH I kinda just trusted clang --instrumentation tools might be wrong but they're very sharp about standards and whatnot :).
<shlevy>
Hmm digging in more
<dtz>
(full disclosure/brag because I don't get to talk about it much-- I was part of getting sanitizers into clang in the first place, particularly integer overflow checks! :D)
<dtz>
yeah I'm curious as well
<dtz>
can ask regehr/etc, they tend to know and when they don't they know those who do :)
<shlevy>
Ah, found it
<dtz>
oh and pointer-overflow checks were result of taking a piece we made for research and upstream'ing it :D
<Mic92>
you can also fork off an arbitrary branch from master I guess
<Mic92>
And I can merge changes to it.
<ikwildrpepper>
yeah, please create a branch with the changes
davidlt_ has joined #nixos-dev
davidlt has quit [Ping timeout: 246 seconds]
<Mic92>
ikwildrpepper: I have created a branch cpan-update on nixpkgs. Is it possible to create the jobset without starting it immidiatly? I think volth wanted to update something before that.
<Mic92>
maybe I should just build staging without any changes and then add the updates from cpan?
<Mic92>
FRidh[m]: on which branch do you base your python update hydra jobsets?
jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nixos-dev
Nadrieri1 has joined #nixos-dev
Jackneilll has joined #nixos-dev
jtojnar_ has joined #nixos-dev
aminechi1haoui has joined #nixos-dev
acowley_ has joined #nixos-dev
shlevy_ has joined #nixos-dev
lassulus_ has joined #nixos-dev
pbogdan_ has joined #nixos-dev
Nadri has quit [*.net *.split]
pbogdan has quit [*.net *.split]
shlevy has quit [*.net *.split]
octe has quit [*.net *.split]
Profpats1 has joined #nixos-dev
acowley has quit [Ping timeout: 260 seconds]
Profpatsch has quit [Ping timeout: 260 seconds]
aminechikhaoui has quit [Ping timeout: 260 seconds]
lassulus has quit [Ping timeout: 260 seconds]
jtojnar has quit [Ping timeout: 260 seconds]
Jackneill has quit [Ping timeout: 260 seconds]
srhb has quit [Quit: Quit]
jtojnar_ is now known as jtojnar
octe has joined #nixos-dev
srhb has joined #nixos-dev
shlevy_ is now known as shlevy
orivej has joined #nixos-dev
<shlevy>
OK added a task to my list to make a no-/bin/sh RFC :P
<niksnut>
I think this has been discussed before, and the outcome was "too much trouble to be worth it"
<clever>
ive seen things break in a very weird way if the host has to rebuild part of the glibc in /bin/sh
<clever>
because of split outputs, part of glibc can be GC'd, and if nix cant get that from a binary cache, it rebuilds all of the outputs
<clever>
so, $out and $lib cant be present
<clever>
so, nix just silently omits the libc for /bin/sh, and things fail
<shlevy>
niksnut: And yet trouble keeps happening in one form or another with the status quo :(
<shlevy>
I'll save the full argument for the RFC, but fixing it with a hard-coded bash is one-time development cost and then it's done.
<clever>
shlevy: at least leave us with a /usr/bin/env!!
<shlevy>
Yes, but as a static binary that only works in shebangs and only does execvp :P
<clever>
lol
<shlevy>
Really I'd like to just have a binfmt-misc that does execvp on shebangs, but that ship has sailed sadly
<shlevy>
IMO /usr/bin/env is just a userspace patch on the kernel's shebang support, not an actual program
JosW has quit [Quit: Konversation terminated!]
<clever>
shlevy: i also use env vs set, to debug things in shells
<clever>
set shows un-exported things, env is only what has been exported
<simpson>
clever: That's the `env` from coreutils, though: /nix/store/8qh2yq93x7ijvkvrf9gi0jhxr8jwh341-coreutils-8.28/bin/env
<clever>
surprisingly, PS1 isnt exported, so sub-shells that dont source the init scripts ignore it
<shlevy>
clever: Sure, but just use env from PATH
<clever>
yeah
jtojnar has quit [Ping timeout: 256 seconds]
jtojnar has joined #nixos-dev
<sphalerite>
shlevy: so shebangs should look like #!python ?
<sphalerite>
err I mean #!runhaskell
<sphalerite>
:D
<shlevy>
sphalerite: Yeah, that should work. Unfortunately it would make every script written on NixOS unportable :( I guess I should add the binfmt for it and try to getit adopted by all distros. Then in 2-5 decades we can get rid of /usr/bin/env
<sphalerite>
heh
<sphalerite>
fun stuff
<shlevy>
Hmm I wonder if we can get by just with system() being a weak symbol in glibc and having bash contain a lib that reexports libc and has a proper system()
<sphalerite>
shlevy: while we're at it, adding support for more than one fixed arg would be nice
<shlevy>
Note that doing it Right TM involves escapes and such
<clever>
ive also heard rumors, that darwin just plain doesnt support #! at the kernel level
<clever>
but the system() function in their libc fakes it
<clever>
so some programs fail to start shell scripts, because they used the execve variant directly
jtojnar_ has joined #nixos-dev
jtojnar has quit [Read error: Connection reset by peer]
<shlevy>
Yeah, their libc is part of the kernel ABI :(
<shlevy>
I wish they had a libsyscall if they really insisted on that approach
<clever>
windows is a bit worse in that area
<clever>
the syscall api isnt well defined, and can change within a single release
<shlevy>
A*P*I?
<clever>
ABI
<shlevy>
Yeah, that's the darwin policy too. You always should go through libsystem, and in return they get to change the underlying kernel interface freely
<shlevy>
Except that means that effectively strtok is part of the kernel ABI now :D
<clever>
ive heard that at one point in time, windows was doing buffer size checks in userland
jtojnar has joined #nixos-dev
<clever>
and if you just run the syscall directly, you can buffer-overflow the kernel
<shlevy>
Amazing
jtojnar_ has quit [Ping timeout: 246 seconds]
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-dev
ma27 has joined #nixos-dev
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-dev
Synthetica has joined #nixos-dev
ma27 has quit [Ping timeout: 252 seconds]
ma27 has joined #nixos-dev
Sonarpulse has joined #nixos-dev
tilpner_ has joined #nixos-dev
tilpner has quit [Ping timeout: 264 seconds]
tilpner_ is now known as tilpner
ma27 has quit [Quit: WeeChat 2.0]
ma27 has joined #nixos-dev
__Sander__ has quit [Quit: Konversation terminated!]
davidlt_ is now known as davidlt
obadz- has joined #nixos-dev
obadz has quit [Ping timeout: 256 seconds]
obadz- is now known as obadz
tilpner_ has joined #nixos-dev
tilpner has quit [Ping timeout: 248 seconds]
tilpner_ is now known as tilpner
orivej has quit [Ping timeout: 240 seconds]
Lisanna has quit [Quit: Lisanna]
ma27 has quit [Ping timeout: 245 seconds]
Synthetica has quit [Quit: Connection closed for inactivity]
orivej has joined #nixos-dev
lassulus_ is now known as lassulus
lassulus has quit [Changing host]
lassulus has joined #nixos-dev
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-dev
ma27 has joined #nixos-dev
jtojnar has quit [Read error: Connection reset by peer]
pie_ has quit [Remote host closed the connection]
pie_ has joined #nixos-dev
ma27 has quit [Ping timeout: 256 seconds]
MichaelRaskin has joined #nixos-dev
<MichaelRaskin>
Hm, apparently my plan to cause a minor flame war in the nixpkgs-tests PR doesn't seem to work out.
<gchristensen>
hah
<MichaelRaskin>
Well, given that I have an ongoing conversation there, I guess I should wait until it reaches agreement before trying to stir via the ML
<gchristensen>
the problem is it is such a good idea
<MichaelRaskin>
(also, attention-grabbing attempts should probably be after the release)
<MichaelRaskin>
gchristensen: well, on the one hand it doesn't gather a lot of +1's; on the other, I hoped it is a good idea worth bikeshedding a bit.
<gchristensen>
aye
<MichaelRaskin>
But oh how nice it is to write a test and _not_ wait for a minute or a few for stupid unrelated stuff.
<gchristensen>
agreed
<MichaelRaskin>
OCR-based LibreOffice menu control. I would ragequit trying to implement a NixOS test for that.
<gchristensen>
please kill me
<MichaelRaskin>
It's actually a meaningful test! If you launch LibreOffice without DBus, it will draw the window but not the menu bar, don't ask me why
<MichaelRaskin>
Presumably, messing the installation badly enough could also lead to the same outcome.
<clever>
MichaelRaskin: did we discuss using haskell in the testcase runner before?
<MichaelRaskin>
I don't think so
<clever>
ah, i mentioned it to somebody a week or 2 ago, replacing the perl test-driver with a haskell program
<MichaelRaskin>
I… am not sure this is an improvement from pragmatic point of view
<clever>
and instead of having naked bash over the serial backdoor, youhave a second haskell program inside the guest, with a proper multiplexed channel between the 2
<clever>
so you can do more complex and inteligent things inside the guest
<MichaelRaskin>
My current point is that booting a full NixOS in Qemu inside a build is Expensive
<clever>
wouldnt it be a lot simpler, to just launch a custom daemon, that can be told over an rpc, 'the next key is X'
<MichaelRaskin>
clever: I have a feeling that my mess of bash and Python is also cleaner than that
<clever>
MichaelRaskin: how would you test xorg without booting a full nixos?, and what if there was a bug in the nixos module that generated the systemd services?
<MichaelRaskin>
Unfortunately, a test for NixOS keymap handling _has to_ run a full NixOS
<MichaelRaskin>
Frankly, I would just put the entire test inside the VM, then let it SSH out to report the results.
<MichaelRaskin>
(then shutdown the VM from inside, of course)
<clever>
different tests have different needs
<MichaelRaskin>
Well, I obviously don't care about complex NixOS tests
<MichaelRaskin>
But we have a Firefox test which just happens to also boot an entire NixOS in a Qemu.
<clever>
runInLinuxVM could be used for some of the tests
<clever>
and others could probably run without any qemu
<MichaelRaskin>
As I say, the test I _have_ in the PR — for LibreOffice — would likely already be ragequit-worthy in a VM.
<gchristensen>
sorry MichaelRaskin you'll just have to be more inflamatory
<MichaelRaskin>
Does Rust pattern matching allow adding «nixos-test» as an alias for «test» in ofborg without code duplication between branches?
<gchristensen>
as a command?
<MichaelRaskin>
Yes
<gchristensen>
I think you'd have to duplicate the branch
<MichaelRaskin>
Pity
<gchristensen>
aye
<MichaelRaskin>
I considered asking you to add an alias, then starting to use it just to make people wonder are there any other tests if nixos-test needs the nixos- prefix.
<gchristensen>
that seems like a good idea
<MichaelRaskin>
Well, if it cannot be done in a proper clean way, reaching agreement with Profpatsch on implementation structure first sounds like a good prerequisite
<gchristensen>
though if the dream of borglang comes true, we can first convert all the commands in to an AST and simplify from there in to a single opcode
<ekleog>
hmm, I don't have the code of ofborg under the eyes, but it would be possible to have [...], x @ _ if x == "test" || x == "nixos-test" => [...]
<ekleog>
s/would/should/
<gchristensen>
ekleog: how about within a `match`?
<ekleog>
I think replacing `"test"` with `x @ _ if x == "test" || x == "nixos-test"` should do the trick
<ekleog>
(not sure the x @ _ thing is actually required, though)
<gchristensen>
are you the Rust wizard I've been waiting for?
<ekleog>
(like, as you have a ref it's likely possible to just do `_ if left[0] == "test" || left[0] == "nixos-test"`)
<ekleog>
(that said it's not much better than an if-then-else in this case, so… :°)
<ekleog>
hmm… are you opposed to adding a dependency on eg. nom for parsing? I think it'd be much easier to have an AST with nom
<gchristensen>
MichaelRaskin: I think I found the rust wizard I've been waiting for
<ekleog>
Rust is fun :°
<Profpats1>
MichaelRaskin: I have been summoned!
<gchristensen>
ekleog: no I'm not opposed to it, as long as it a) doesn't require nightly, b) complies on aarch64-linux, x86_64-linux and x86_64-darwin
<MichaelRaskin>
I wonder if a stable version of full procedural macros is ever coming
Sonarpulse has quit [Ping timeout: 240 seconds]
<MichaelRaskin>
Profpats1: which gave the PR one of the two substantial conversations so far…
<MichaelRaskin>
But if I want to try bringing a bit of bikeshedding to the PR, maybe actually getting somewhere in our slow calm conversation before creating a flamewar is a good idea.
Profpats1 is now known as Profpatsch
<Profpatsch>
MichaelRaskin: Well, we need both tests as leaves and tests inside the dependency tree.
<Profpatsch>
In the best case, the library can be used for both.
<ekleog>
gchristensen: I'm pretty sure it does compile on aarch64-linux (it's pure rust afair). Will try to rewrite the parser with nom, then :) Just curious, how do you build ofborg? I just nix-shell'd in ofborg/, and tried a `cargo test`, but it failed building openssl-sys :/ (last time I tried I just removed the dependency on openssl, but I guess it won't be a solution here :°)
<MichaelRaskin>
Aren't the tests inside the dependency tree just the leaf-test that got drvSeq-ed?
davidlt_ has quit [Ping timeout: 240 seconds]
<gchristensen>
ekleog: be in the root of the repo, not in the ofborg subdir, then nix-shell, then cd ofborg, and cargo test
<MichaelRaskin>
(And they can be imported from the test list for that, without the definitions ever leaving tests/)
<Profpatsch>
MichaelRaskin: Yes, exactly.
<gchristensen>
ekleog: ps: #nixos-borg :)
<Profpatsch>
MichaelRaskin: But why would you want to put tests in a separate directory?
<MichaelRaskin>
I think their dependencies just work a bit differently
<MichaelRaskin>
For example, for testing evince you need something not in its build closure and not used for most tests; but you have a choice what exactly to take
<MichaelRaskin>
(And combinatorial explosion for tests works differently and meaningfully — see my remark about xelatex+zathura)
<Profpatsch>
MichaelRaskin: These tests I’d put into leaves, yes.
<Profpatsch>
I don’t want to install zathura to build xelatex.
<Profpatsch>
MichaelRaskin: There’s two levels here: when I talk about leaves, I mean symbolical leaves, but the files could be anywhere.
<Profpatsch>
So for example the xelatex test could still have a file inside pkgs/zathura/tests/xelatex.nix
<Profpatsch>
And then be imported in pkgs/tests/default.nix.
MichaelRaskin has quit [Ping timeout: 264 seconds]