Skip to content
Commit a5061920 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Use static method

This is ugly as hell. But if we directly access `\OCP\IUserSession::getUser` here PHP throws a segfault on some servers:

```
gdb /usr/sbin/apache2 --batch --quiet -ex "run -f /etc/apache2/apache2.conf -DNO_DETACH -DONE_PROCESS -DDEBUG $defines" -ex "quit"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

[New Thread 0x7fffdd206700 (LWP 28386)]
[Thread 0x7fffdd206700 (LWP 28386) exited]
[New Thread 0x7fffdd206700 (LWP 28387)]
[New Thread 0x7fffdc975700 (LWP 28388)]

Program received signal SIGSEGV, Segmentation fault.
zend_parse_parameters (num_args=2, type_spec=type_spec@entry=0x7ffff3f85227 "s|s") at /build/php5-pO28mL/php5-5.5.9+dfsg/Zend/zend_API.c:923
923 /build/php5-pO28mL/php5-5.5.9+dfsg/Zend/zend_API.c: No such file or directory.
A debugging session is active.

    Inferior 1 [process 28382] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
```

I'm still struggling to get a minimal example of this (also considering that it doesn't happen on every system :party). Anyways, it's a functional workaround until I determined the root cause… (also given the fact that patches may never be backported to distributions 🙈
parent 277c9f4a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment