LXR goes in to infinite loop if '#include path//to/src.h' is found in source code.
Brought to you by:
ajlittoz
The version of LXR that you are using: 2.2.1, tried 2.3.3 but the error is still there.
Any error message that you see: No message since http request essentially hangs.
What database you are using: mysql.
Issue was noticed with C++ souce file. If there is include statement that looks like this :
#include "RecoLocalTracker/Records//interface/TrackerCPERecord.h"
LXR will get confused by '//' and goes into infinite loop. We created our own workaround patch [0], but maybe you can make it a more robust solution.
[0] https://github.com/cms-sw/cms-docker/blob/master/docker-lxr/custom.d/lxr-2.2.1-incpath-fix.patch
The double slash is an excellent reason for the bad behaviour. Can you confirm that everything works fine with single / separator?
I had similar problems in other language scanners but never thought to check C/C++ (because they're so heavily used in cross-referencing the Linux kernel).
Everything is working fine with single seperator.
The patch needs some improvement procesing '//' though (but at least it does not hang).
http://snpy.in/ZeAGiZ
I've pushed a patch to the git repository. It works for me but my test is quite artificial. Could you test it on your real tree? Note: just substitute Lang.pm and restart the web server. Empty the caches in the browser for added reliability. No need to reindex.
If it works fine also for you, I'll upload a fixed release.
I confirm that after replacing Lang.pm with your version in 2.2.1, path generation works as expected with various type of paths ('//////', './' '../').
Released 2.3.4 with bug fix
Thanks for reporting the bug.
I'd advise you to update to latest release because all releases prior to 2.3.1 are plagued by a major vulnarability risk. DB schema did not change, you can substitute LXR source and don't need to reindex tree.
Last edit: Andre-Littoz 2019-02-04
We are using docker container to deploy lxr. Unfortunately, if I blindly overwrite to verions 2.3.3,
genxreffails to index new changes. Everything else works. This is the main issue preventing me from upgrade.