[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
GitHub user imgpulak opened a pull request:

    https://github.com/apache/lucene-solr/pull/286

    [LUCENE-8075] Possible null pointer dereference in core/src/java/org/…

    …apache/lucene/codecs/blocktree/IntersectTermsEnum.java
   
    Fix it

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/imgpulak/lucene-solr LUCENE-8075_2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/286.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #286
   
----
commit 132d377474e52bebeaaabe71543930684ea6fb95
Author: PG <[hidden email]>
Date:   2017-12-06T06:47:05Z

    [LUCENE-8075] Possible null pointer dereference in core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java
   
    Fix it

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr issue #286: [LUCENE-8075] Possible null pointer dereference in c...

asfgit
Github user jpountz commented on the issue:

    https://github.com/apache/lucene-solr/pull/286
 
    Actually I wonder that we should instead remove the `if (fr.index == null)` branch. @mikemccand We do not seem to use the ability to skip the load of the terms index anymore?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155178451
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    @jpountz Do we not need to make -
    fstReader = null;
    ?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user jpountz commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155291224
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    My point was that it seems that fr.index can never be null. So we will never enter this branch.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155292700
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    Okay. In that case shall we that piece of code? @jpountz


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user jpountz commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155295185
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    This is why I pinged @mikemccand to know whether the fact that the index is always loaded is accidental or desired.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155296495
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    Okay. Now I understand. Thanks! Let me know what we are going to do. I will make changes accordingly.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155300117
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    Hi @jpountz,
   
    May I get the design documents of Lucene?
   
    Thanks,
    Pulak


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user jpountz commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155303664
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    All documentation is in javadocs, we don't have other documentation.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155304417
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    Thanks. That works for me.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155607967
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    @jpountz Any update here?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user imgpulak commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r155930642
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    @jpountz, @mikemccand any update here?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] lucene-solr pull request #286: [LUCENE-8075] Possible null pointer dereferen...

asfgit
In reply to this post by asfgit
Github user mikemccand commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/286#discussion_r156538059
 
    --- Diff: lucene/core/src/java/org/apache/lucene/codecs/blocktree/IntersectTermsEnum.java ---
    @@ -106,37 +106,37 @@ public IntersectTermsEnum(FieldReader fr, Automaton automaton, RunAutomaton runA
         if (fr.index == null) {
           fstReader = null;
    --- End diff --
   
    Sorry for the slow respons ehere @imgpulak and @jpountz but Adrien is right: `fr.index` can never be null anymore.  So I think we should change the code to `assert` it's never null and only do the `else` clause of the current `if` statement?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]