« first day (3293 days earlier)      last day (1640 days later) » 

4:24 AM
\o
 
4:41 AM
@DaveRandom I’m updating/reviewing my profile, and I forgot I totally quoted you in it o/
(The o/ is for you too @JoeWatkins)
 
5:14 AM
oh hai dan
 
5:55 AM
posted on October 22, 2019

 
6:41 AM
Segmentation fault in zend_type_to_string_resolved – #78715
 
Wes
7:00 AM
hey joe
 
7:19 AM
o/
 
cmb
\o
 
o/
 
7:37 AM
can someone arrange swapping today for Friday please, I need a weekend already ...
go ... I'll wait here ...
 
Wes
@StatikStasis can u ping me when you have some time? thanks :B
 
@Sjon throw new ComputerStillSaysItIsTuesdayException()
 
8:00 AM
fiduciary of, relating to, or involving a confidence or trust: such as
 
cmb
If it was Friday, PHP 7.1.33 would be very late. :)
 
8:30 AM
moooooooooooin
there will be more to add to that, but that's my suggestion for a sane-ish universal/cross-platform API
/cc @Wes ^
 
Wes
ah ah.... ah ah......... i know some of these words.....
 
I wouldn't worry too much about the impl details, I have spent quite a while researching it and I'm confident about the underlying mechanisms, it's more about whether the userland API is sane
oh btw @Wes you can do $in = fopen('CONIN$', 'r'); and $out = fopen('CONOUT$', 'r+'); on windows to get handles to the console input/output streams, independent of redirection of stdio streams
(and $tty = fopen('/dev/tty', 'r+'); on *nix)
 
/me waves
 
What is stored in op_array.run_time_cache ? And how it's used? Interested in parts related to the immutable class implementation....
Not so much information is available about FFI preloading and immutable classes in the engine ((
 
8:44 AM
oh and also it turns out that console input handles actually do work properly with stream_select() on windows, the only reason they don't work is because the console isn't in "canonical" mode (i.e. it only passes input through to the program on EOL)
/cc @kelunik/@Trowski ^
on *nix people use exec('stty ...')-type constructs to control it, windows doesn't have an equivalent
those APIs would give a native way to control that stuff without relying on an external program
I think I've also figured out a way to make pipe readability select()-able on windows via WaitForMultipleObjectsEx(), but that's a separate and much more complicated project :-P
oh and /cc @PeeHaa ^^
 
@DaveRandom have fun implementing :-P
 
@bwoebi the windows php_select() already has most of the building blocks in place, actually. The only difficult-ish bit is cleaning up the unsignalled handles before returning
 
@lisachenko opline related caching used inside the vm,commonly ce pointer where the a class name is input to the op, property offsets, etc.
@DaveRandom what is an unsignalled handle?
 
Function name mangling is wrong for some parameter types – #78716
 
ummm... if you really want to know then search for "windows overlapped IO"... speak to you in a week or three :-P
 
8:58 AM
@DaveRandom Ah, overlapped IO sounds familiar, basically the windows equivalent of async io...
 
@bwoebi ugh, looks complex...
 
@lisachenko class entries, functions, property info
 
@bwoebi yeh, it uses "window messages"
 
it's used to speed up execution by avoiding the hashtable lookups for those things (and some other related logic in some cases)
 
it's not single-threaded in the same way as *nix, but the other threads involved are the kernel's problem so it's not incompatible with TSRM (in theory, anyway)
 
8:59 AM
@lisachenko not really, it's just cache slots assigned to operands (a few bytes allocated at compile time for the individual ops)
 
@JoeWatkins are there some docs? Or i need to look at source code to find out? I'm trying to change the single opcode in the method and run it again. But without success, it's cached somewhere...
 
source code, zend_vm_def.h for how it's used and zend_compile.c for how the required space is calculated (pre-allocated) at compile time
I didn't understand what you were doing there, not sure what that means ?
which op do you want to repeat, and why ?
 
@JoeWatkins Say, I have a method with simple return $a+$b where $a and $b are arguments. And I want to replace ZEND_ADD with ZEND_SUB in runtime, I can see that opcode.code is changed, but VM still performs addition and not a subtraction as expected...
 
CTRL+F CACHE_PTR, CACHE_POLY, CACHE_ADDR in zend_vm_def.h
who created the original ZEND_ADD instruction ?
was it your extension ?
 
@JoeWatkins No, it's existing user-defined method in the given class. And I want to modify its opcodes
 
9:04 AM
you can't do that, they will exist in opcache
what you must do is intercept when the original method is being executed, and execute yours (which is a copy) instead, but you can't touch the original methods instructions, they are actually immutable as marked ...
 
@JoeWatkins then I need to change them in opcache too... Just a memory and it should be readable/writeable. But Dmitry has so fricky level in macros magic, it prevents me from doing that ))
 
no, you can't do that
they are being concurrently executed by every process ... nothing to do with api's or the memory being used, it doesn't make sense to try doing that ...
 
@JoeWatkins Ok, then let's go back for one step...
 
@JoeWatkins assuming he's using opcache for his dark magic
 
How can I modify opcodes during compile-time? include => parse AST => opcodes => here I need some point to transform them => produce new code => compile it (JIT or whatever) => execute
I can completely redefine method right now with closure, see ReflectionMethod::redefine() in my library and \ZEngine\Reflection\ReflectionMethodTest::testRedefine
But still can't find out the way to change one single opcode and control them for user-defined methods..
 
9:12 AM
if you are targeting production with this code, then you have to be prepared for production environments where the code is in opcache and is immutable, if your method of replacement cannot deal with that, then it's no good ...
if you're not targeting production then hack away, do whatever works, but know what your code is compatible with in that case (not opcache, for a start) ...
 
@JoeWatkins I have a plans to use it during preload time in FFI, should work, I guess...
 
what is executing ZEND_ADD during preload ?
at the moment you are replacing at call time, no ?
for an extension, you'd have to have rinit/minit hooks that check that your compile callback is installed in the correct way - such that it is called before opcache and after the zend compiler ...
opcache doesn't want you to be able to do that and tries to force it's hook at different stages ...
how you do that without access to hooks, I'm not sure ...
 
@JoeWatkins my entrypoints will be lxr.room11.org/xref/php-src%407.4/Zend/zend_compile.c#73-74 I will replace them with my callback via FFI preload stage. So, first script will install a hook to process all following scripts and modify them. At the end, I should restore back this pointer to prevent a segfault, as my code (and pointer to it) will become invalid on the next request
But this is only theory, i don't know now if I succeeded with implementation or not...
it's like a walking on a sharp edge...
 
you are running with scissors ... expect to get hurt ...
 
9:29 AM
imagine operating a website, which has a pretty minimal "API" like endpoint, to accept orders from a third party, and while your main site remains up, the API returns a HTML 'down for maintenance' message to "API" requests, with a 200 status.
 
this stuff is crazy to write in an extension, to write it in FFI is just so needlessly complicated, I say needlessly, because their appears to be literally no need for it based on the fact that nobody really uses the extension(s) already available ... in fact, everyone has spent the last several years trying to move away from the need to monkey patch or interfere with the runtime, they were forced too because of a lack of runkit in early 7 releases ...
this is really interesting, on a geeky internals level ... but the thought of anyone actually using it, frightens me a little, I've gotta be honest, I don't think I could advise that anyone actually use it ...
and since those first releases, it's got even harder to make these modifications in a safe way .. this should give you pause for thought, really long pause ...
 
Time for a Joe meme
okay nevermind, couldn't find a suitable graphic to represent FFI
 
For me it's like a big puzzle, previously I have done a lot of crazy stuff with stream wrappers and source-code transformation to make AOP available for PHP without extension, so it's only the question of required time to finish it (thus some help or good advices are always appreciated)
 
I'm happy to help, keep asking whatever you like ... I'm just doing opinion ...
@MarkR The Wizard and The Wand a short story about PHP and FFI ...
 
pcntl_waitpid does not return process PID on child exit – #78717
 
9:37 AM
@Wes will probably illustrate it, one day ... right Wes ?
 
I'm waiting now for @cmb to push __vectorcall convention support for FFI, it's almost working under Windows platform now, it would be cool to finish it in one week to present later at BgPHP
@JoeWatkins this tweet is already in my slides )) Kudos!
 
Wes
has FFI went full opcache already?
 
i.imgur.com/xNoqfiA.jpg my photoshop skills need work
 
@Wes nope, during preload stage it's possible to do something unordinary...
Dmitry proves that in email
 
agreed, you've taken something beautiful - me, and made something truly horrible ... that ...
 
9:41 AM
@JoeWatkins )))
 
cmb
@lisachenko, bugs.php.net/bug.php?id=78716 is fixed, but bugs.php.net/bug.php?id=78714 would be harder to fix. Would it be sufficient for you to have binaries without that 2nd bug fixed?
 
@cmb first one was a blocker for me, thank you for resolving it! Second one is unpleasant, but can be temporary resolved by adjusting the definition, so not a blocker.
@cmb Could you please trigger a snapshot build to test it?
@cmb am I right that the first issue addreses zend_hash_add_or_update resolving?
 
10:00 AM
@cmb From which source is the custom vectorcall build done?
 
cmb
@lisachenko, just checked and zend_hash_add_or_update() is now properly resolved. I'll make a snapshot build available as soon as possible.
@NikiC, for now it's in my fork at github.com/cmb69/php-src/tree/ffi-vectorcall. Will force push the rebase right away.
 
@cmb does this need a patched libffi?
 
cmb
yes, unfortunately
 
did you try to upstream your changes yet?
 
cmb
@NikiC, libffi patch at https://github.com/cmb69/libffi/tree/vectorcall
Did not provide upstream PR, since support is actually a fake, see commit message of https://github.com/cmb69/libffi/commit/6729d65503fbb08221262ff1915f900cb6c6edb9
Also, we need that for current stable libffi, but master is rather different. And also looks a bit stuck, see github.com/libffi/libffi/releases/tag/v3.3-rc0
 
10:16 AM
morns
 
cmb
10:57 AM
Has anybody here access to the PECL database?
 
@cmb I doubt it. What's it you need to do?
 
cmb
TL;DR: probably there are multiple entries in the DB now (see last comment)
 
I don't know - when I was seeing weird stuff before, deleting the release and uploading it again seemed to work better than trying to just upload a new version.
 
Full static compile without php7ts.dll – #78718
 
11:19 AM
@cmb libffi looks deprecated/unsupported, no active maintainers indeed..
 
@lisachenko seems challenging ;)
 
Why Gmail API is very very slow to load inbox messages (I am using PHP)
As I understood first we get the message id's of auth user and then again we have to make request to fetch messages using these ids and then print those in our inbox. Thus this is taking a lot of time to show messages in my inbox how can I overcome this issue ?
Also tried Batch Request as mentioned in Gmail Docs
 
 
1 hour later…
12:53 PM
seeing this is a little inactive chatroom.
wondering why !isset() doesn't work and it has to be $value !== null?
 
@EchoDino isset is semantically different from !== null.
isset asks whether the reference was even set, !== null just compares the value to null.
It's worth noting that !== null is contained within isset()
That is, isset() will return FALSE if the value is NULL, even when the variable is set
But the concept is different.
 
@EchoDino It's actually quite active- just a slow period at the moment.
 
cmb
1:11 PM
@EchoDino, try isset($value)
 
thank you all!
 
1:36 PM
fopen() http wrapper silently ignores long Location headers – #78719
 
2:05 PM
> Fatal error: Allowed memory size of 134217728 bytes exhausted at /usr/src/php/Zend/zend_operators.c:1471 (tried to allocate 121110373 bytes) in /usr/src/php/run-tests.php on line 1120
All I did was install a sigsegv handler >.<
--TEST--
unset() CV 8 (unset() of global variable in array_unique($GLOBALS))
--XFAIL--
var_dump missmatch
--FILE--
<?php
$a = "ok\n";
$b = "ok\n";
@array_unique($GLOBALS);
echo $a;
echo $b;
echo "ok\n";
?>
--EXPECTF--
ok
ok
ok
?????????
 
2:21 PM
finfo_file reports double mimetype – #78720
 
/* Install a signal handler for SIGSEGV and run it on an alternate stack.
 * Using an alternate stack allows the handler to run even when the main
 * stack overflows.
 */
if ((ddtrace_altstack.ss_sp = malloc(SIGSTKSZ))) {
    ddtrace_altstack.ss_size = SIGSTKSZ;
    ddtrace_altstack.ss_flags = 0;
    if (sigaltstack(&ddtrace_altstack, NULL) == 0) {
        ddtrace_sigaction.sa_flags = SA_ONSTACK;
        ddtrace_sigaction.sa_handler = ddtrace_sigsegv_handler;
        sigemptyset(&ddtrace_sigaction.sa_mask);
Hmm, it's the sigaction that causes issues, for whatever reason that is.
But only when run through the run-tests.php script; run directly it has no issues.
I really hope it's not just a PHP 5.6 bug.
 
2:52 PM
@Wes Hey! What's up?
 
Wes
busy?
 
Just a little- but I will answer as I have breaks. =)
 
3:09 PM
@cmb FYI, latest vectorcall snapshot fails when parsing C def with __vectorcall: Uncaught FFI\ParserException: ';' expected, got '<ID>'
 
cmb
@lisachenko, I'm afraid I've did a bad build again; checking ...
 
@cmb It's ok, just let you know about that )
 
Wes
@StatikStasis i needed a table saw buy advice. but decided to wait black friday
 
3:44 PM
github.com/php/php-src/pull/4838/… <-- does that mean that will be a type error only if declare(strict_types=1)?
 
cmb
4:06 PM
@lisachenko, yup, built against plain PHP-7.4; will do new builds, and let you know when they're ready.
 
4:18 PM
@Wes Ah nice!
One sec
 
cmb
@JoeWatkins, gentle reminder that 7.1.33 wants to be tagged today (one sec fix). :)
 
@ircmaxell default values are always strict. int->float is allowed in strict
 
4:44 PM
:+1:
 
5:03 PM
@cmb I'm uploading to jump3, can you push over to distributions for me please ...
might take ten minutes, or half an hour, to finish the upload ...
depends on weather, or something ...
 
cmb
@JoeWatkins, yup will move to dists :)
 
ta
91kb/s ... it's like being stuck in 2002 ...
only I'm much balder, and fatter
 
cmb
5:19 PM
I'm proudly downloading with 550KB/sec ;)
 
5:48 PM
Which namespace should I put a Pagination class?
Helpers? Meta?
Pagination::current_page(), etc
I'm thinking of Helpers. Seems too generic, but I don't know where to put this thing
 
ThW
6:24 PM
@LucasBustamante urgs no - Basically anything fits in Helpers and what should Meta mean.
I would not think of Pagination as a single class but a namespace itself. For different implementations. Maybe inside Controls
and you should try to avoid class functions / static calls - they are fixed dependencies and often hidden globals
 
7:01 PM
opcache_is_script_cached() fails – #78721
Missing output for opcache basic logging – #78722
Opcache enabled but fails opcache_enabled check – #78723
Missing output (bug78175) – #78724
No output (bug74663) – #78725
opcache_invalidate fails – #78726
 
7:30 PM
Does nobody test anything on windows or is somebody doing it wrong? :P
 
ThW
@PeeHaa production on windows? ... nope
 
production?
 
ThW
would you use opcache in a dev environment?
 
Yup. Always.
 
@ThW Depending on what I am doing yes I would
Mostly because it used to fail a lot :-)
 
ThW
7:34 PM
but would that be dev or testing?
 
Both
 
ThW
regular or to make sure it works with opcache?
 
Mostly to not get caught by opcache bugs later, but I mostly just leave it enabled
 
Both. In any given execution, 99% of my files wont have changed, so let opcache deal with them. Also, opcache will definitely be used in production, and it can occasionally behave differently to PHP without opcache
 
ThW
hmm maybe I should enable it :-P
 
7:36 PM
@MarkR Depending on the release "occasionally"
:D
 
Undefined index: scripts – #78727
 
Bloody annoying there's even two ways of doing it tbh. I'm not sure what the rationale behind it is.
I assume something or another has to have opcache disabled to work.
 
Class 'Loader' not found – #78728
 
7:51 PM
Cannot declare class B – #78729
Access to undeclared static property – #78730
 
bleh, Windows Server 2012... it can go die in a fire, at least 2016 doesn't have the shitty "tablet" interface that should not be on a server
 
@Tiffany They also did that on the server edition? :D
 
yes >.<
 
hehe
 
I think it was either one or two of the servers I managed had it, fucking hated remoting into those servers
UI was laggy
they nixed it in 2016, so at least when I opened the start menu, I didn't have a five second delay so it could load and take up the whole screen
 
8:05 PM
:P
 
yeah, don't miss working on WIMP servers, lol
granted, it is a bit of a niche skill
 
Cannot redelcare f1() – #78731
 
I remember having to do config on iis and crying
 
haha
 
I currently run 20 windows servers in production, including something like 15 IIS nodes. Replacing them all with Docker and Kubernetes.
 
8:08 PM
And now you have two problems
:P
 
I used to run/support two, then had a dev/test server
 
I was always a stickler for home-managed infrastructure, until I tried GKE.
 
I really should've developed the discipline to wash dishes daily instead of once every two weeks...
 
I need the displine to unload the dishwasher so I can put new things in it.
 
Same here with the washing machine :P
 
8:11 PM
Warning: Can't preload class Foo – #78732
 
ok jeeves we got it opcache is broken
 
I think v-altruo is going for a personal best
Either that or he really, really wants to cause CMB to break down in tears
 
Welcome to mtv php boilingpoint
 
Undefinted function get_x() – #78733
 
Holy moly, @Jeeves! So many bugs coming in!
 
ThW
8:21 PM
seems that opcache is a little broken on windows
 
Inheritance error – #78734
 
Either they've got a serious missconfiguration, or opcache is completely and utterly buggered to high heavens on Windows
 
@DaveRandom Good grief... got me 18 days later with this... that's ridiculous. =P
 
dishes done, cats' water fountain washed and filter changed...
just a couple things left for today
 
Cannot declare class because name in use – #78736
Class 'Bar' not found – #78735
 
8:33 PM
@MarkR I suspect the latter now
 
Yuuuup.
 
Can't preload class test with unresolved initializer for constant – #78737
 
Obviously forgot to #undef OPCACHE_BREAK_EVERYTHING
 
Uncaught Error: Call to undefined function test() – #78738
 
Looks like someone who hasn't ever heard the term "root cause"
 
8:43 PM
Has anyone contacted that guy and asked them what Microsoft are up to, that is getting them to make so many bug reports (not just tonight)?
 
That's where you make 25 bug reports and find 5 errors right?
Or make -1 bug reports and the error is completely imaginary
 
@Danack Microsoft distributes a version of PHP through Web Platform Installer, which is basically a package manager for Windows web servers. My guess is they're updating the version of PHP to the latest? Cause last I checked WPI, it had 5.6 as the latest.
It might have had 7.0, but I don't believe so
 
php.iis.net download version is php53.exe ... im afraid to run it
 
@Tiffany There was also:
Nov 20 '18 at 17:01, by JasonRShaver
My name's Jason Shaver and I'm an engineer with Azure (not marketing, support, or sales) interested in chatting with a few PHP professionals. I'm wondering if maybe, just maybe, we missed the boat on PHP with Azure. Wait, stop laughing =) If your willing to schedule ~15m chat, please go to http://aka.ms/php2018 and give me your email. I'm willing to give $25 Amazon gift cards (or charity) for anyone I talk with.
So they might be on manoeuvres.
 
yeah but that v-altruo dude has been opening bug reports before that, I believe
 
doesn't show closed bugs
 
Good shout.
Shall we take bets on how many lines of code it takes to fix all of them at once? I'll open by betting a decent ham sandwich that it's.... 3
 
but it appears even closed bugs are still in 2019, but I swear I saw another microsoft email address a couple years ago
 
@NikiC just checking to avoid duplication - do you know if anyone has made an expandable/collapse code viewer (like bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd) for use with PhpParser?
 
BLT... or turkey club...
 
8:55 PM
@Tiffany both sound good...
 
twitter.com/SaraMG/status/1186704317627224064 now I know why Sara argues against using a framework on PHP.net xD
 
@MarkR possibly also just the arguments for using Cake from the early 2000s...and now.
 
Was it a lie?
 
9:10 PM
It certainly wasn't webscale.
 
Clearly needed more mongodb then
 
Which Sara might actually endorse.
s/endorse/sponsor licenses/
 
9:23 PM
@Danack not aware of one
 
ta.
 
cmb
@lisachenko, the new builds are ready: windows.php.net/downloads/snaps/ostc/ffi-vectorcall
 
10:01 PM
Warning Internal error: wrong size calculation – #78739
 
10:21 PM
Fatal Error Not enough entries in has table for preloading – #78740
 
10:49 PM
I mean I don't really use any framework either
But I don't do massive apps soooo
Autoloader, router, and DI container from packagist and you do the rest using PSR-7 objects
 
11:09 PM
@JoeWatkins oh hai Joe
I’m in a weird time zone where I see everything 22 hours later
 

« first day (3293 days earlier)      last day (1640 days later) »