[Bug libstdc++/89759] New: pop_back on empty vector gives wrong size

2019-03-18 Thread anshulaggarwal987654321 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89759

Bug ID: 89759
   Summary: pop_back on empty vector gives wrong size
   Product: gcc
   Version: 7.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anshulaggarwal987654321 at gmail dot com
  Target Milestone: ---

after calling pop_back on an empty vector, the vector.size() doesnt display
zero and displays a large value UINT64_MAX.

this leads to inconsistency and breaking of the data structure. (bug)


unconfirmed : it might try to deallocate unowned memory

[Bug libstdc++/89758] queue and priority queue show invalid size when empty container is poped. Further pushes lead to inconsistent values/ queue state

2019-03-18 Thread anshulaggarwal987654321 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89758

--- Comment #1 from anshul aggarwal  
---
uncomfirmed : the dataStructure might try to "free" unowned memory

[Bug libstdc++/89758] New: queue and priority queue show invalid size when empty container is poped. Further pushes lead to inconsistent values

2019-03-18 Thread anshulaggarwal987654321 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89758

Bug ID: 89758
   Summary: queue and priority queue show invalid size when empty
container is poped. Further pushes lead to
inconsistent values
   Product: gcc
   Version: 7.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anshulaggarwal987654321 at gmail dot com
  Target Milestone: ---

Created attachment 45988
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45988=edit
this code does the operations and prints the inconsistencies

After poping an empty queue or a dequeue , when we check the size it outputs
UINT64_MAX -1 = "18446744073709551615" (bug1)

incase of queue, pushing leads to inconsistent results (bug2)

incase of priority queue, pushing gives out an error ( not a bug)